Raised This Month: $ Target: $400
 0% 

[REQ]10 Seconds no Gun's


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 06-10-2009 , 09:48   Re: [REQ]10 Seconds no Gun's
Reply With Quote #1

cs_set_weapon_ammo doesn't work that way. Index is the weapon entity's index.

Fakemeta way:
Code:
stock fm_get_weapon_id(index, const weapon[]) {     new ent = -1;         while((ent = engfunc(EngFunc_FindEntityByString, ent, "classname", weapon)) != 0)     {         if(index == pev(ent, pev_owner))             return ent;     }     return 0; }

Engine way:
Code:
stock get_weapon_id(id, const weapon[]) {     new ent = -1         while((ent = find_ent_by_class(ent, weapon)) != 0)     {         if(id == entity_get_edict(ent, EV_ENT_owner))             return ent     }         return 0 }

Fakemeta: cs_set_weapon_ammo( fm_get_weapon_id( player, "weapon_*" ), ammo )
Engine: cs_set_weapon_ammo( get_weapon_id( player, "weapon_*" ), ammo )


Also you must skip dead players in spawn event.
__________________

Last edited by [X]-RayCat; 06-10-2009 at 09:56.
[X]-RayCat is offline
SpokY
Senior Member
Join Date: Feb 2009
Location: Darmstadt
Old 06-10-2009 , 10:19   Re: [REQ]10 Seconds no Gun's
Reply With Quote #2

can u please make a compleat code :S sorry xD
__________________
xtream.eSports Weil's einfach nur Geil ist !
www.xtream-esports.com
SpokY is offline
Send a message via ICQ to SpokY Send a message via MSN to SpokY
Reply


Thread Tools
Display Modes

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 23:36.


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