taking away weapons
#1

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.
Reply
#2

Get thier current weapons (Might be inaccurate), Reset thier weapons, Then give every weapon except the Minigun slot back to them
Reply
#3

i kno how to reset,but no idea how to save the weapons and give them back, exept for minigun. any1 help?
Reply
#4

https://sampwiki.blast.hk/wiki/Weapons
Reply
#5

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.
Reply
#6

public OnPlayerDisconnect(playerid)
{
ResetPlayerWeapons(playerid)
}
Reply
#7

Quote:
Originally Posted by KyleSmith
public OnPlayerDisconnect(playerid)
{
ResetPlayerWeapons(playerid)
}
wrong

ResetPlayerWeapons(playerid);
Reply
#8

Still wrong

pawn Код:
public OnPlayerDisconnect(playerid)
{
    ResetPlayerWeapons(playerid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)