OnPlayerStateChange help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: OnPlayerStateChange help (
/showthread.php?tid=115265)
OnPlayerStateChange help -
TouR - 23.12.2009
how can i use OnPlayerStateChange to remove a player from a vehicle

??
Re: OnPlayerStateChange help -
BMUK - 23.12.2009
pawn Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
{
RemovePlayerFromVehicle(playerid);
}
Re: OnPlayerStateChange help -
TouR - 23.12.2009
can you tell me how to do this with TEAM_CIVIL and police car??
Re: OnPlayerStateChange help -
Ironboy500 - 23.12.2009
Just put up there:
Код:
if(gTeam[playerid] == TEAM_CIVIL)
Re: OnPlayerStateChange help -
TouR - 23.12.2009
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
Re: OnPlayerStateChange help -
BMUK - 23.12.2009
change
GetPlayerVehicleID(playerid) == 598
to
GetVehicleModel(GetPlayerVehicleID(playerid)) == 598
Re: OnPlayerStateChange help -
TouR - 23.12.2009
thank you finaly made it