taking away weapons - 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: taking away weapons (
/showthread.php?tid=71321)
taking away weapons -
CJ101 - 31.03.2009
ok i have a minigun minigame in my server, but when they exit i need to take the weapon away. i tried setting ammo to 0, but does not work.
Re: taking away weapons -
ICECOLDKILLAK8 - 31.03.2009
Get thier current weapons (Might be inaccurate), Reset thier weapons, Then give every weapon except the Minigun slot back to them
Re: taking away weapons -
CJ101 - 31.03.2009
i kno how to reset,but no idea how to save the weapons and give them back, exept for minigun. any1 help?
Re: taking away weapons -
Pyrokid - 31.03.2009
https://sampwiki.blast.hk/wiki/Weapons
Re: taking away weapons -
90NINE - 31.03.2009
Try this:
http://pastebin.com/m7b6b85ee
I just wrote this really quick so it's
not tested but should work.
The idea is to give the player a negative amount of ammo (subtracting), so they end up with 0. They'll still have the weapon, but they'll have 0 ammo so they won't be able to use/see it.
Re: taking away weapons -
Kyle - 31.03.2009
public OnPlayerDisconnect(playerid)
{
ResetPlayerWeapons(playerid)
}
Re: taking away weapons -
Danut - 31.03.2009
Quote:
Originally Posted by KyleSmith
public OnPlayerDisconnect(playerid)
{
ResetPlayerWeapons(playerid)
}
|
wrong
ResetPlayerWeapons(playerid)
;
Re: taking away weapons -
LarzI - 31.03.2009
Still wrong
pawn Код:
public OnPlayerDisconnect(playerid)
{
ResetPlayerWeapons(playerid);
return 1;
}