19.01.2012, 17:03
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new newcar = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER)
{
if(VehicleInfo[newcar][vMember] == gTeam[playerid] && VehicleInfo[newcar][vRank] <= pInfo[playerid][pRank])
{
if(gTeam != VMember)
{
SendClientMessage(playerid,COLOR_RED,"You can't drive this car");
RemovePlayerFromVehicle(playerid);
return 1;
}
}
}
return 1;
}