13.01.2015, 06:22
Use a switch instead, uses less resources and should work better.
This is only an example, im a bit confused by your indentation, so the brackets might not match.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
switch(GetVehicleModel(vehicleid))
}
case 416, 497, 427, 490, 596, 597, 598, 599, 253:
{
{
if(StoleCopCarRecently == false)
{
if(gTeam[playerid] != POLICE || MEDIC || FBI)
{
CommitCrime(playerid, 6, "LEO Vehicle Theft");
StoleCopCarRecently = true;
SetTimer("SCCR", 1000 * 60, false);
}
}
default:
{
if(StoleCarRecently == false)
{
if(gTeam[playerid] != POLICE || MEDIC || FBI)
{
CommitCrime(playerid, 1, "Vehicle Theft");
StoleCarRecently = true;
SetTimer("SCR", 1000 * 60, false);
}
}
}
}
{
}
}
}
return 1;
}