Ich will eine Car ID abfragen, sieht so aus:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new veh;
if(aktiv == 0)
{ veh = if(IsPlayerInAnyVehicle(playerid))//123
{//124
if(GetVehicleModel(veh) == 520)//125
{
for(new i=0; i<MAX_PLAYERS; i++)
RemovePlayerFromVehicle(playerid);
new Name[MAX_PLAYER_NAME];
new text[128],string[128];
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"%s hat einen Hydra Kampfjet betreten!");
SendClientMessage(i,0xFF0000AA,string);
}
}
}
return 1;
}
Die Errors:
C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123) : error 029: invalid expression, assumed zero
C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 124) : error 028: invalid subscript (not an array or too many subscripts): "IsPlayerInAnyVehicle"
C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 125) : error 001: expected token: "}", but found "if"
C:\Users\Lebbe\Neuer Ordner\SAMP\gamemodes\Mazerone.pwn(123 -- 125) : fatal error 107: too many error messages on one line
Ich hoffe ihr könnt mir helfen