19.02.2010, 15:17
Hi there FreddeN,
I cant see much of an issue with your code... Just incase here is how I would do it:
Give it a try, make sure it works 
Cheers,
TJ
I cant see much of an issue with your code... Just incase here is how I would do it:
Код:
public OnPlayerStateChange(playerid,newstate,oldstate) { if(newstate == PLAYER_STATE_DRIVER) { new veh = GetPlayerVehicleID(playerid); if(veh == PoliceCar1) { if(gTeam[playerid] == TEAM_LSPD && PlayerInfo[playerid][pLAERank] < 1) { SendClientMessage(playerid,COLOR_GREY," You are not authorized to use that vehicle."); RemovePlayerFromVehicle(playerid); } else if(gTeam[playerid] != TEAM_LSPD) { SendClientMessage(playerid,COLOR_GREY," You are not a police officer"); RemovePlayerFromVehicle(playerid); } } } }

Cheers,
TJ