03.03.2013, 18:18
^
pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
switch(newstate) {
case PLAYER_STATE_ONFOOT: {
switch(oldstate) {
case PLAYER_STATE_DRIVER: OnPlayerExitVehicle(playerid,255);
case PLAYER_STATE_PASSENGER: OnPlayerExitVehicle(playerid,255);
}
}
}
new vehicle = GetVehicleModel(GetPlayerVehicleID(playerid));
new Float:PX, Float:PY, Float:PZ;
if(vehicle == 492 || vehicle == 412 )
{
if(gTeam[playerid] != TEAM_GROVE) //Or whatever
{
GetPlayerPos(playerid,PX,PY,PZ);
SetPlayerPos(playerid,PX,PY,PZ+3);
SendClientMessage(playerid,COLOR_RED,"[ERROR]: This car is locked only grove street members can use it.");
}
}
}