Checking if the nos is active? - 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: Checking if the nos is active? (
/showthread.php?tid=429597)
Checking if the nos is active? -
JamesS - 10.04.2013
Well, I need too restrict something, wanna keep it secret though.. But when your nos is being used, it shoudn't work, as there any way to check if the nos is being used?
I was bout to add a timer, but idk, it doesn't seem so effective to me..
Re: Checking if the nos is active? -
Riddick94 - 10.04.2013
To activate nitro in car you gonna press by default CTRL key or LMB, so then check in OnPlayerKeyStateChange which key player pressed and then is player car has nitro, if so - do anything what you want.
pawn Код:
if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO) != 0) // this car has nitro
{
}
Re: Checking if the nos is active? -
iJumbo - 10.04.2013
You can use
GetVehicleComponentInSlot(vehicleid, slot) to check if nos "
https://sampwiki.blast.hk/wiki/Componentslots " is active or not