Raised This Month: $51 Target: $400
 12% 

ham_give_weapon and ham_strip_weapon


Post New Thread Reply   
 
Thread Tools Display Modes
dstopgunner
Senior Member
Join Date: Oct 2007
Old 06-05-2008 , 10:40   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #31

Could you/anyone please fix me plugin?
I dont know how to
Quote:
Originally Posted by arkshine View Post
You have to loop over all players.
dstopgunner is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 06-05-2008 , 10:52   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #32

Something like :

Code:
    new gi_MaxClients;         public plugin_cfg ()     {         new gi_MaxClients = get_maxplayers ();     }         public event_new_round()     {         for ( new i = 1; i <= gi_MaxClients; ++i )         {             if ( user_has_weapon ( i, CSW_KNIFE ) )             {                 ham_strip_weapon ( i, "weapon_knife" );             }         }     }
__________________
Arkshine is offline
Old 06-07-2008, 09:20
dstopgunner
This message has been deleted by dstopgunner. Reason: Accident db post
dstopgunner
Senior Member
Join Date: Oct 2007
Old 06-07-2008 , 09:58   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #33

Can I make change the event_new_round() to event_new_round(id) and everything else in event_new_round from "i" to "id" ?

But in me knifecharactermod I try use this but not working
PHP Code:
    new gi_MaxClients;
 
    public 
plugin_cfg ()
    {
        new 
gi_MaxClients get_maxplayers ();
    }
 
    public 
event_new_round(id
    { 
        for ( new 
id 1id <= gi_MaxClients; ++id )
        {
            if (
crowbarer[id])
            {
                
set_user_health(id140)
            }            
            if (
hammerman[id])
            {
                
set_user_health(id100)
            }
        }
    } 
Can help me fix?
dstopgunner is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-07-2008 , 10:38   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #34

No. Register the event "new_round", then make like in arkshine post from above.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 06-08-2008 , 01:00   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #35

Yes I know I have to register the event but do you mean I must use "i" instead of "id" ?
dstopgunner is offline
Old 06-09-2008, 08:18
dstopgunner
This message has been deleted by dstopgunner. Reason: Accident xtra post while uploading
dstopgunner
Senior Member
Join Date: Oct 2007
Old 06-09-2008 , 08:18   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #36

Someone Help Me Please This Plugin doesnt not work even though I followed what people tell me what to do its not working.
Please Help asap , need it badly .
Attached Files
File Type: sma Get Plugin or Get Source (knife_stripper.sma - 563 views - 1.2 KB)
dstopgunner is offline
DA
Veteran Member
Join Date: Nov 2005
Location: Germany/Münster
Old 06-11-2008 , 09:46   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #37

Is there a way to use this function for removing a defusekit from a player?
__________________
DA is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-11-2008 , 09:52   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #38

You dont need to use this...see http://www.amxmodx.org/funcwiki.php?...fuse&go=search
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 06-11-2008 , 12:37   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #39

dstopgunner: Please make a topic in the scripting help forum if you are having problems.



I added in a code segment to ham_strip_weapon which should be used for Counter-Strike; I left it out before for mod independency. It clears the backpack ammo for grenades and C4.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
anakin_cstrike
Veteran Member
Join Date: Nov 2007
Location: Romania
Old 11-29-2008 , 19:06   Re: ham_give_weapon and ham_strip_weapon
Reply With Quote #40

Mistake.
__________________


Last edited by anakin_cstrike; 11-30-2008 at 04:06.
anakin_cstrike 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 11:17.


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