Raised This Month: $ Target: $400
 0% 

Global Message + Ammo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 06-25-2007 , 19:45   Re: Global Message + Ammo
Reply With Quote #2

Your problem is that you're trying to look for those weapon indexes before you've actually given the gun to the user.

As it stands, the glbprint() function is completely pointless. Not only are the local variables in that function never used, but the client_print() calls in it can replace the glbprint() calls without problem.

Code:
public giveawp(id) {     give_item(id, "weapon_awp")     new WeapEntIndex = find_ent_by_owner(-1, "weapon_awp", id, 0)     cs_set_weapon_ammo(WeapEntIndex, 3)     new name[32]     get_user_name(id, name, 31)     client_print(0, print_chat, "%s now has an AWP with 3 bullets!", name) }
http://www.amxmodx.org/funcwiki.php?...name&go=search

In future please indent your code. ;)

Last edited by Lee; 06-25-2007 at 20:14.
Lee 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 21:26.


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