Raised This Month: $ Target: $400
 0% 

ammo


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 04-05-2009 , 05:26   Re: ammo
#4

PHP Code:
#include < amxmodx >
#include < cstrike >
#include < fakemeta >

public plugin_init ( )
{
     
// Registering your plugin...
}

public 
somefunc /* func args */ )
{
    if(
PlayerLevel[id] == 5// Checks level.
    
{
        
give_item(id,"weapon_ump45"); // Give yourself ump45 at level 5
        
cs_set_weapon_ammo fm_get_weapon_ent idCSW_UMP45 ), /* Your ammo */ )
    }
}

fm_get_weapon_ent(idwpnid 0)
{
    new 
name[32]

    if(
wpnid)
        
get_weaponname(wpnidname31)

    if (!
equal(name"weapon_"7))
        
format(namesizeof (name) - 1"weapon_%s"name)

    return 
fm_find_ent_by_owner(get_maxplayers(), nameid)
}

fm_find_ent_by_owner(id, const classname[], ownerjghgtype 0)
{
    new 
strtype[16] = "classname"
    
new ent id

    
switch (jghgtype)
    {
        case 
1strtype "target"
        
case 2strtype "targetname"
    
}

    while ((
ent engfunc(EngFunc_FindEntityByStringentstrtypeclassname)) && pev(entpev_owner) != owner)
    {
    }

    return 
ent


Last edited by TheRadiance; 04-05-2009 at 05:52.
TheRadiance is offline
Send a message via ICQ to TheRadiance
 



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 02:28.


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