AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Giving M249 Not working (https://forums.alliedmods.net/showthread.php?t=223427)

proffs 08-13-2013 12:29

Giving M249 Not working
 
Why does this not works?

PHP Code:

            give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249200


wickedd 08-13-2013 12:34

Re: Giving M249 Not working
 
It does work. Show your code or debug it.

proffs 08-13-2013 12:39

Re: Giving M249 Not working
 
Quote:

Originally Posted by wickedd (Post 2012218)
It does work. Show your code or debug it.

Is the ammo right?
What is the default ammo?

And what is the deafult ammo for fiveseven then?

PHP Code:

cs_set_user_bpammo(idCSW_FIVESEVEN509 


akcaliberg 08-13-2013 12:53

Re: Giving M249 Not working
 
Code:

Index Name        Number    Ammo                              Weapon                              Clips
CSW_P228          1          give_item(id,"ammo_357sig")      give_item(id, "weapon_p228")        CLIP SIZE/BP SIZE: 13/52
==================================================================================================================================
CSW_SCOUT          3          give_item(id,"ammo_762nato")      give_item(id, "weapon_scout")        CLIP SIZE/BP SIZE: 10/90
==================================================================================================================================
CSW_XM1014        5          give_item(id,"ammo_buckshot")    give_item(id, "weapon_xm1014")      CLIP SIZE/BP SIZE: 7/32
==================================================================================================================================
CSW_MAC10          7          give_item(id,"ammo_45acp")        give_item(id, "weapon_mac10")        CLIP SIZE/BP SIZE: 30/100
==================================================================================================================================
CSW_AUG            8          give_item(id,"ammo_556nato")      give_item(id, "weapon_aug")          CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_ELITE          10        give_item(id,"ammo_9mm")          give_item(id, "weapon_elite")        CLIP SIZE/BP SIZE: 30/120
==================================================================================================================================
CSW_FIVESEVEN      11        give_item(id,"ammo_57mm")        give_item(id, "weapon_fiveseven")    CLIP SIZE/BP SIZE: 20/100
==================================================================================================================================
CSW_UMP45          12        give_item(id,"ammo_45acp")        give_item(id, "weapon_ump45")        CLIP SIZE/BP SIZE: 25/100
==================================================================================================================================
CSW_SG550          13        give_item(id,"ammo_556nato")      give_item(id, "weapon_sg550")        CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_GALI          14        give_item(id,"ammo_556nato")      give_item(id, "weapon_gali")        CLIP SIZE/BP SIZE: 35/90
==================================================================================================================================
CSW_FAMAS          15        give_item(id,"ammo_556nato")      give_item(id, "weapon_famas")        CLIP SIZE/BP SIZE: 25/90
==================================================================================================================================
CSW_USP            16        give_item(id,"ammo_45acp")        give_item(id, "weapon_usp")          CLIP SIZE/BP SIZE: 12/100
==================================================================================================================================
CSW_GLOCK18        17        give_item(id,"ammo_9mm")          give_item(id, "weapon_glock18")      CLIP SIZE/BP SIZE: 20/120
==================================================================================================================================
CSW_AWP            18        give_item(id,"ammo_338magnum")    give_item(id, "weapon_awp")          CLIP SIZE/BP SIZE: 10/30
==================================================================================================================================
CSW_MP5NAVY        19        give_item(id,"ammo_9mm")          give_item(id, "weapon_mp5navy")      CLIP SIZE/BP SIZE: 30/120
==================================================================================================================================
CSW_M249          20        give_item(id,"ammo_556nato")      give_item(id, "weapon_m249")        CLIP SIZE/BP SIZE: 100/200
==================================================================================================================================
CSW_M3            21        give_item(id,"ammo_buckshot")        give_item(id, "weapon_m3")      CLIP SIZE/BP SIZE: 8/32
==================================================================================================================================
CSW_M4A1          22        give_item(id,"ammo_556nato")      give_item(id, "weapon_m4a1")        CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_TMP            23        give_item(id,"ammo_9mm")          give_item(id, "weapon_tmp")          CLIP SIZE/BP SIZE: 30/120
==================================================================================================================================
CSW_G3SG1          24        give_item(id,"ammo_762nato")      give_item(id, "weapon_g3sg1")        CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_DEAGLE        26        give_item(id,"ammo_50ae")        give_item(id, "weapon_deagle")      CLIP SIZE/BP SIZE: 7/35
==================================================================================================================================
CSW_SG552          27        give_item(id,"ammo_556nato")      give_item(id, "weapon_sg552")        CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_AK47          28        give_item(id,"ammo_762nato")      give_item(id, "weapon_ak47")        CLIP SIZE/BP SIZE: 30/90
==================================================================================================================================
CSW_P90            30        give_item(id,"ammo_57mm")        give_item(id, "weapon_p90")          CLIP SIZE/BP SIZE: 50/100
__________________________________________________________________________________________________________________________________

DEFUSE KIT                    give_item(id, "item_thighpack")                                                                       
----------------------------------------------------------------------------------------------------------------------------------
NVGS                          give_item(id, "item_nvgs")                                                           
----------------------------------------------------------------------------------------------------------------------------------
SHIELD                        give_item(id, "weapon_shield")                                                           
----------------------------------------------------------------------------------------------------------------------------------
CSW_C4            6          give_item(id, "weapon_c4")                                            BP SIZE: 1
----------------------------------------------------------------------------------------------------------------------------------
CSW_VEST          31        give_item(id, "item_kevlar")
----------------------------------------------------------------------------------------------------------------------------------
CSW_VESTHELM      32        give_item(id, "item_assaultsuit")
----------------------------------------------------------------------------------------------------------------------------------
CSW_HEGRENADE      4          give_item(id, "weapon_hegrenade")                                      BP SIZE: 1
----------------------------------------------------------------------------------------------------------------------------------
CSW_FLASHBANG      25        give_item(id, "weapon_flashbang")                                      BP SIZE: 2
----------------------------------------------------------------------------------------------------------------------------------
CSW_SMOKEGRENADE  9          give_item(id, "weapon_smokegrenade")                                  BP SIZE: 1
----------------------------------------------------------------------------------------------------------------------------------


But it's not the problem here.

MrKiller2010 08-13-2013 16:19

Re: Giving M249 Not working
 
Here:

PHP Code:

            give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249200


And here:

PHP Code:

            give_item(id"weapon_fiveseven")
            
cs_set_user_bpammo(idCSW_FIVESEVEN100


proffs 08-13-2013 16:20

Re: Giving M249 Not working
 
Quote:

Originally Posted by MrKiller2010 (Post 2012400)
Here:

PHP Code:

            give_item(id"weapon_m249")
            
cs_set_user_bpammo(idCSW_M249200


And here:

PHP Code:

            give_item(id"weapon_fiveseven")
            
cs_set_user_bpammo(idCSW_FIVESEVEN100


Thanks a lot Mrkiller!

Xellath 08-14-2013 06:27

Re: Giving M249 Not working
 
If you are unsure, check the funcwiki or any amxx/hl1 documentation - the answer is always at hand.

To not only ramble about searching, if you're lazy like me - you can use this stock I made a while back: http://forums.alliedmods.net/showpos...6&postcount=12

naven 08-14-2013 15:30

Re: Giving M249 Not working
 
Everything is here: http://wiki.amxmodx.org/CS_Weapons_Information


All times are GMT -4. The time now is 15:44.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.