SA-MP Forums Archive
Seatbelt? - 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: Seatbelt? (/showthread.php?tid=586229)



Seatbelt? - NickMirra - 20.08.2015

removed - was hacked.


Re: Seatbelt? - maxy153 - 20.08.2015

wut?


Re: Seatbelt? - Lunoxel - 20.08.2015

You make a new variable, new seatbelt[MAX_PLAYERS];
Then, on command /sb put seatbelt [playerid] = 1;
When they remove the belt (at OnPlayerExitVehicle, for example), put seatbelt[playerid] = 0;

Then comes this:
Код:
if(seatbelt[playerid] == 0 && !IsADMVCar(vehicle) && !IsADMVHeli(vehicle) && !IsABicycle(vehicle))
{
	SCM(playerid, COLOR_LIGHTGREEN,"Your seatbelt is not on type /sb to put your seatbelt on.");
}