How to use SetPlayerArmedWeapon? - 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: How to use SetPlayerArmedWeapon? (
/showthread.php?tid=102674)
How to use SetPlayerArmedWeapon? -
Danny_Costelo - 16.10.2009
https://sampwiki.blast.hk/wiki/SetPlayerArmedWeapon
The wiki doesnt give enough info to really understand how it works.
I tried SetPlayerArmedWeapon(playerid, 0) and they can still use any other weapon?
Can someone explain what it does, or give a little sample script on how it works?
Re: How to use SetPlayerArmedWeapon? -
MadeMan - 16.10.2009
It simply puts a weapon into players hands.
Re: How to use SetPlayerArmedWeapon? -
_Vortex - 16.10.2009
Quote:
Originally Posted by Seif_
This function switches to the weapon if he has it in his slots.
You can use this if you want a player to only hold a certain weapon without scrolling. However you'd have to use a timer to prevent scrolling using this function.
Before in previous versions, we(or at least I) used GivePlayerWeapon by giving him 1 ammo and taking it away right after so I can switch to a certain weapon that I have in my weapon slots.
|
Excuse my French, but why would you want to make them not able to scroll?
Re: How to use SetPlayerArmedWeapon? -
_Vortex - 16.10.2009
Quote:
Originally Posted by Seif_
It's something you can script, but to answer your question, maybe you're in a DM server and you fall on a pickup that takes away all your weapons for a certain time except the current one you're holding. Instead of removing them from the player, you'd do this.
|
Gotcha.
Re: How to use SetPlayerArmedWeapon? -
Damn Right M.I.A! - 16.10.2009
Quote:
Originally Posted by MadeMan
It simply puts a weapon into players hands.
|
Even if you don't have the weapon?
Re: How to use SetPlayerArmedWeapon? -
MadeMan - 16.10.2009
Quote:
Originally Posted by Damn Right M.I.A!
Quote:
Originally Posted by MadeMan
It simply puts a weapon into players hands.
|
Even if you don't have the weapon?
|
No, the player has to have that weapon first. It just forces him to use it.
Respuesta: How to use SetPlayerArmedWeapon? -
[DOG]irinel1996 - 18.12.2010
And GivePlayerWeapon? Is the same thing... Really?
Re: Respuesta: How to use SetPlayerArmedWeapon? -
Ash. - 18.12.2010
Quote:
Originally Posted by irinel1996
And GivePlayerWeapon? Is the same thing... Really?
|
GivePlayerWeapon gives the player the weapon
SetPlayerArmedWeapon causes them to be equipped with it. (or anything in the players inventory)