SA-MP Forums Archive
Weapon holder script - 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)
+--- Thread: Weapon holder script (/showthread.php?tid=550076)



Weapon holder script - CalvinC - 10.12.2014

I've been looking for a script for my server which basically puts weapons on the player's back, hips or front when they're not equipped with them, but still have them.
Haven't been able to find any good ones that works.


Re: Weapon holder script - M4D - 10.12.2014

Search !
https://sampforum.blast.hk/showthread.php?tid=205666


Re: Weapon holder script - zT KiNgKoNg - 10.12.2014

I've seen loads on the SA-MP forums over the time that I've been here, you could use ****** (I doubt you've even tried).

Note: Its clear that you've not even bothered because if you Knew what you actually wanted you would have found it within seconds, Its pathetic that people like you are using this section to MAKE other people search for it, stop being lazy and search.


One: https://sampforum.blast.hk/showthread.php?tid=492691
Two (Include): https://sampforum.blast.hk/showthread.php?tid=77222


Re: Weapon holder script - CalvinC - 10.12.2014

Quote:

Haven't been able to find any good ones that works.

@M4D - The guns on this script are at really unrealistic and weird places, i cant figure out how to change the coordinates nor what weapons are who in the script.

@zT KiNgKoNg - Instead of holding a paragraph about what some people do, read my actual post first.
Link 1: Amazing, but it changes the weapon scrolling to Y and N, which i dont want.
Link 2: I dont know how to use the include.


Re: Weapon holder script - CalvinC - 11.12.2014

Bump.


Re: Weapon holder script - CalvinC - 14.12.2014

Second bump.
Or atleast can someone tell me how to edit this:
https://sampforum.blast.hk/showthread.php?tid=205666

To remove certain weapons or change the coordinates of the weapons? I cannot figure out what lines of code belongs to what weapons.


Re: Weapon holder script - dominik523 - 14.12.2014

Код:
if(weaponid[1] && weaponammo[1] > 0){
                        if(pArmedWeapon != weaponid[1]){
                                if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
                                        SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                                }
                        }
                        else {
                                if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
                                        RemovePlayerAttachedObject(playerid,0);
                                }
                        }
                }
                else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
                        RemovePlayerAttachedObject(playerid,0);
                }



Re: Weapon holder script - CalvinC - 14.12.2014

Quote:
Originally Posted by dominik523
Посмотреть сообщение
Код:
if(weaponid[1] && weaponammo[1] > 0){
                        if(pArmedWeapon != weaponid[1]){
                                if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
                                        SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
                                }
                        }
                        else {
                                if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
                                        RemovePlayerAttachedObject(playerid,0);
                                }
                        }
                }
                else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
                        RemovePlayerAttachedObject(playerid,0);
                }
Quote:

can someone tell me how to edit this

Instead of showing me a couple of lines of code, can you explain what it means?
Etc this: "if(weaponid[1] && weaponammo[1] > 0)"
It's not the weapon ID 1 (Brass Knuckles) i dont think, because i dont see anyones mentioning 31(m4) and stuff.


Re: Weapon holder script - CalvinC - 15.12.2014

Third bump.


Re: Weapon holder script - pcp - 15.12.2014

You should take a look at this https://sampwiki.blast.hk/wiki/SetPlayerAttachedObject

Whenever you want, just attach the weapon object to the player's bone.

https://sampwiki.blast.hk/wiki/Game_Obje..._.28weapons.29

This one to find the desired weapon object id

I hope you understand me