On Duty Problem - 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: On Duty Problem (
/showthread.php?tid=251634)
On Duty Problem -
captainjohn - 27.04.2011
Hello I have made a onduty command for level 4 admins.
I have a problem, when you type /onduty you are supposed to get ALL your weapons reset and get given a minigun.
It doesn't work.
It gives you a minigun when you spawn on the server and doesn't reset all weps when typing /onduty and when you go off duty by typing /onduty again, your weapons don't get reset.
Here is the code.
http://pastebin.com/exHREq2S
Re: On Duty Problem -
Steven82 - 27.04.2011
The link doesn't work, if it aint that big of code post it in the [pawn] brackets here.
Re: On Duty Problem -
grand.Theft.Otto - 27.04.2011
Try resetting the weapons BEFORE you give the player the minigun. So it should be like this:
pawn Код:
ResetPlayerWeapons();
GivePlayerWeapon(,38,999999);
Make sure you add playerid or player1 in those functions because I'm sure you're using one of the two? Also make sure you don't have GivePlayerWeapon with a minigun on OnPlayerSpawn.
We also need the new pastebin code.