Raised This Month: $ Target: $400
 0% 

[Solved] CS16: A new method for Unlimited@Infinity Clip.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 10-03-2014 , 04:44   [Solved] CS16: A new method for Unlimited@Infinity Clip.
Reply With Quote #1

Hi coders,

Now i want to use this method:
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>

public plugin_init()
{
    
register_plugin("UC Other Method""0.0.1""wbyokomo")
    
    
register_clcmd("say /uc""CmdUC")
}

public 
CmdUC(id)
{
    if(!
is_user_alive(id)) return;
    
    
strip_user_weapons(id)
    
give_item(id"weapon_knife")
    new 
wpn give_item(id"weapon_mp5navy")
    if(
wpn != -1)
    {
        
cs_set_weapon_ammo(wpn32767//set infinity clip
        
cs_set_user_bpammo(idCSW_MP5NAVY0//prevent reloading
    
}
}

//But the problem is when someone get a new weapon, i need to check all current weapon enyity and set infinity clip like method above.
//So what kind of forward that suitable to hook when player get a new weapons?
//I don't want to use CurWeapon message, it's called to often.
//Is "Ham_Item_AttachToPlayer" good to use? 
So what kind of forward that suitable to hook when player get a new weapons?

Thanks.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019

Last edited by yokomo; 10-04-2014 at 15:06. Reason: Problem solved. See https://forums.alliedmods.net/showpost.php?p=2207080&postcount=7
yokomo 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 17:29.


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