Hab das ganze jetzt so macht noch Errors
new Supcar[MAX_PLAYERS];
ocmd:supcar(playerid,params[])
{
if(!IstSpielerAdmin(playerid,1)) return SendClientMessage(playerid,Rot,"Du bist kein Admin");
if(Supcar[playerid]== 1)
{
DestroyVehicle(Supcar[playerid];
}
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst dir kein Auto spawnen, solange du in einem Auto sitzt!");
ShowPlayerDialog(playerid,Supcar_Dialog,DIALOG_STYLE_LIST,"Supcars","Monster Truck\nTourismo\nBandito\nSandking\nHotknife\nMaverick\nShamal","Spawnen","Abbrechen");
return 1;
}
if(dialogid == Supcar_Dialog)
{
if(response)
{
if(listitem == 0)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar; //7023
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(556,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] = 1;
}
if(listitem == 1)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(451,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
if(listitem == 2)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(568,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
if(listitem == 3)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(495,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
if(listitem == 4)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(434,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
if(listitem == 5)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(487,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
if(listitem == 6)
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,Rot,"Du kannst kein Sup-Car spawnen, solange du in einem Auto sitzt!");
new Float:x,Float:y,Float:z,Float:a,Supcar;
GetPlayerPos(playerid,x,y,z);
Supcar=AddStaticVehicle(519,x,y,z,a,0,1);
PutPlayerInVehicle(playerid,Supcar,0);
Supcar[playerid] == 1;
}
}
}
Errors:
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(4697) : error 001: expected token: ",", but found ";"
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7023) : warning 219: local variable "Supcar" shadows a variable at a preceding level
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7027) : error 028: invalid subscript (not an array or too many subscripts): "Supcar"
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7027) : warning 215: expression has no effect
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7027) : error 001: expected token: ";", but found "]"
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7027) : error 029: invalid expression, assumed zero
C:\Users\Ralf\Desktop\Samp o.3x Server\gamemodes\grsa-backup.pwn(7027) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.