25.04.2011, 09:46
top of the script :
under OnPlayerRequestClass :
then use :
P.S : But u better use SetPlayerTeam or gTeam instead of class ids
pawn Code:
new gClassid[MAX_PLAYERS];
pawn Code:
gClassid[playerid] = classid;
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(gClassid[playerid] == 106)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 416)
{
SetPlayerWantedLevel(playerid,4);
SendClientMessageToAll(RED,"%s has stolen a police car");
SetPlayerColor(playerid,RED);
}
}
}
return 1;
}