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



after detecting - iBots - 07.01.2014

well i am trying to make like if he shoot with a gun,i can use yours emma.. and thanks for it but how to make it like:
lets says i detected that he shot,how to make like if he shot and he is detected he cant change to another weapon
i have made everything but i need to make it that he cant change weapons,i have set a timer and everything but how to let it like remove his weapons or toggles his ability to change weapon or give him his weapons back after the timer is over...
note:i have made it to detect if he shot,and it works,but how to let it toggle his weapon changing,i need a code for
public OnPlayerChangeWeapon([playerid, oldweapon, newweapon)


Re: after detecting - Konstantinos - 07.01.2014

An example exists in SA-MP Wiki; although it's better to use a timer instead of the OPU, global array instead of PVar.

https://sampwiki.blast.hk/wiki/OnPlayerUpdate