26.01.2012, 22:33
Hello,i've a problem.
When a player enter in a vehicle id listed in "case",it gets +4 Wanted level,but ONLY for TEAM_CIV.
I got this errors when compiling:
What's wrong?Thanks.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate==PLAYER_STATE_PASSENGER) && if(gTeam[playerid] == TEAM_COP) return 1;
else
{switch(GetVehicleModel(vehicleid))
{
case 497,447,523,416,433,427,490,528,407,544,596,597,598,599,432,601,470,472,430,428;
{
new plwl = GetPlayerWantedLevel(playerid);
plwl = GetPlayerWantedLevel(playerid);
SetPlayerWantedLevel(playerid,plwl +4);
new string[128];
format(string, sizeof(string), "- CRIME - Law Enforcement Vehicle Rob - Wanted Level %d ",plwl);
SendClientMessage(playerid,red,string);
}
}
return 1;
}
I got this errors when compiling:
Код:
C:\Documents and Settings\Symone\Desktop\Cops&Robbers\gamemodes\SF.pwn(1518) : error 029: invalid expression, assumed zero C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1518) : warning 215: expression has no effect C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1518) : error 001: expected token: ";", but found "if" C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1520) : error 017: undefined symbol "vehicleid" C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1522) : error 001: expected token: ":", but found ";" C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1522) : error 036: empty statement C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1531) : warning 209: function "OnPlayerStateChange" should return a value C:\Documents and Settings\S\Desktop\Cops&Robbers\gamemodes\SF.pwn(1532) : error 010: invalid function or declaration 6 Errors.