Help in /sling
#1

Well, its a command thats used in RP Servers mainly and its based on removing the player's weapon and saves it for him until he /unsling's again and the slung weapon appears for him.. like /sling M4 and /unsling M4 so.. i need an idea about it. note that the player can only sling one weapon at a time
Reply
#2

Use GetPlayerWeaponData and get the player's weapon data. Store them to an array and get the weaponid from its name (****** it, you'll find results). Reset the weapons of the player and give them back with a for loop (like the example GetPlayerWeaponData shows at the Wiki), but check if the 3rd parameter which is the weaponid is different (inside the loop) to the id of the weapon you typed (in that case, M4).

Pretty much the same to give it back, but without exceptions. Just loop without any if statement to check the weaponid.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)