/seatbelt on vehicle exit? - 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: /seatbelt on vehicle exit? (
/showthread.php?tid=215238)
/seatbelt on vehicle exit? -
Vataglio - 23.01.2011
I have a command which is /seatbelt and when a player exits the vehicle, I want it to show a /me saying player unbuckles their seatbelt.
What would it be under
Код:
public OnPlayerExitVehicle(playerid, vehicleid)?
Re: /seatbelt on vehicle exit? -
Gabe - 23.01.2011
Yes.
Re: /seatbelt on vehicle exit? -
Vataglio - 23.01.2011
What would be under it?
Re: /seatbelt on vehicle exit? -
Scenario - 23.01.2011
I don't know what command processor you use, but if you have the
/seatbelt command coded in ZCMD, something like this could work:
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
// You should perform a check here to see if they have the seatbelt on, I added an example below.
if(pSeatbelt[playerid] == 1) return cmd_seatbelt(playerid, params);
return 1;
}
Re: /seatbelt on vehicle exit? -
Steven82 - 23.01.2011
Or you could just easily detect if the seatbelt is on, and just remove it without actually having to revert back the the cmd, although thats what i use