Vehicle Help Important ! - 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)
+--- Thread: Vehicle Help Important ! (
/showthread.php?tid=569809)
Vehicle Help Important ! -
itachi - 03.04.2015
Please help with vehicle.
If Player enter vehicle burrito (id 482) so remove player vehicle,because not rcon admin.
Re: Vehicle Help Important ! -
Nautic - 03.04.2015
Take a look here:
https://sampwiki.blast.hk/wiki/OnPlayerStateChange
From this you can get an idea of what to do.
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetVehicleModel(vehicleid) == 482)
{
if(!IsPlayerAdmin(playerid))
{
RemovePlayerFromVehicle(playerid);
}
}
}
return 1;
}