OnPlayerStateChange help
#1

how can i use OnPlayerStateChange to remove a player from a vehicle??
Reply
#2

pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
  RemovePlayerFromVehicle(playerid);
}
Reply
#3

can you tell me how to do this with TEAM_CIVIL and police car??
Reply
#4

Just put up there:
Код:
if(gTeam[playerid] == TEAM_CIVIL)
Reply
#5

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
if(( gTeam[playerid] == TEAM_CIVIL) && (GetPlayerVehicleID(playerid) == 59)
{
RemovePlayerFromVehicle(playerid);
}
}

return 1;
}




i have this... nor errors but it doesn't work
Reply
#6

change

GetPlayerVehicleID(playerid) == 598

to

GetVehicleModel(GetPlayerVehicleID(playerid)) == 598
Reply
#7

thank you finaly made it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)