Raised This Month: $ Target: $400
 0% 

Giving weapons to players


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BigBaller
Veteran Member
Join Date: Mar 2004
Location: Everett, WA
Old 04-28-2004 , 07:29   Giving weapons to players
Reply With Quote #1

I was in the process of updating Admin All in One commands to use weapon names instead of numbers for the weapons plugin that was included.

Well lets get down to business, the problem I am having is when I change them to weapon names, it only gives me a usp, no matter what weapon I issue a command for it gives a usp everytime.

Code:
    new usp, glock, deagle, p228, elite, fiveseven, pumpshotty, autoshotty, mp5, tmp, p90, mac10, ump45, flashbang,     ak, m4, sg552, bullup, scout, awp, sg550, g3sg1, machine_gun, kevlar, assaultsuit, grenade, smokenade, defuser //Pistols     if (weapon_give == usp){     give_item(victim_index,"weapon_usp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     give_item(victim_index,"ammo_45acp")     }     else if (weapon_give == glock){     give_item(victim_index,"weapon_glock18")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     give_item(victim_index,"ammo_9mm")     }     else if (weapon_give == deagle){     give_item(victim_index,"weapon_deagle")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     give_item(victim_index,"ammo_50ae")     }

Now if I changed those names back to numbers it would like its intended to, I am confused, I tired all kinds of things and now I ask for help

Intended use is something like amx_weapon BigBaller 12 that would give me a glock under the number system that worked, with the name system it would give a usp if I used amx_weapon BigBaller glock as defined above in the code snipet.

thanks
__________________

BigBaller is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:33.


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