Raised This Month: $ Target: $400
 0% 

Ammo setting


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FailOverFlow
Member
Join Date: Feb 2012
Location: USA, Detroit
Old 03-27-2012 , 03:09   Ammo setting
Reply With Quote #1

Hi! I need to set ammo of SCOUT to 1, if i have Elf Race (in Warcraft3)
PHP Code:
    // Setting clip
    
if ( p_data[id][P_RACE] == && p_data[id][P_LEVEL] == 10 
    {
        if ( (
get_user_flags(id) & ADMIN_LEVEL_H) && get_pcvar_num(cvar_ngdebug) )
        {
            
ColorChat(idGREEN"[WAR3NG] ^1Debug: Set User Clip Scout");
        }
        
set_user_weap_clip(id,CSW_SCOUT,1)
    }
    else
    {
        if ( (
get_user_flags(id) & ADMIN_LEVEL_H) && get_pcvar_num(cvar_ngdebug) )
        {
            
ColorChat(idGREEN"[WAR3NG] ^1Debug: Set User Clip Scout Standart");
        }
        
set_user_weap_clip(id,CSW_SCOUT,10)
    } 
I put it to
PHP Code:
public fwHamPlayerSpawnPost(id
but after reload clip set to default.
Help me please

Last edited by FailOverFlow; 03-27-2012 at 03:09.
FailOverFlow is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2012 , 09:45   Re: Ammo setting
Reply With Quote #2

cs_set_weapon_ammo(give_item(id, "weapon_scout"), 1)

something like this should work to give the scout only 1 bullet.
__________________

Last edited by Napoleon_be; 03-27-2012 at 09:52.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-27-2012 , 09:46   Re: Ammo setting
Reply With Quote #3

Quote:
Originally Posted by FailOverFlow View Post
but after reload clip set to default.
Look at ConnorMcLeod's plugin for weapon's max clip.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Ex1ne
Senior Member
Join Date: Oct 2011
Location: Norway
Old 03-27-2012 , 09:47   Re: Ammo setting
Reply With Quote #4

Quote:
Originally Posted by Napoleon_be View Post
cs_set_user_ammo(give_item(id, "weapon_scout"), 1)

something like this should work to give the scout only 1 bullet.
Cs_set_weapon_ammo * ?
__________________

Last edited by Ex1ne; 03-27-2012 at 09:48.
Ex1ne is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2012 , 09:52   Re: Ammo setting
Reply With Quote #5

Quote:
Originally Posted by Ex1ne View Post
Cs_set_weapon_ammo * ?
fixed. thanks
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
FailOverFlow
Member
Join Date: Feb 2012
Location: USA, Detroit
Old 03-28-2012 , 08:23   Re: Ammo setting
Reply With Quote #6

After reload ammo set to 10. I think need to hook buy (or something like thah) and hook reload event.
Can help me with this/
FailOverFlow is offline
Reply



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 20:29.


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