Raised This Month: $ Target: $400
 0% 

Help with WeaponChance


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
lagaar
Junior Member
Join Date: May 2011
Old 08-08-2011 , 11:57   Re: Help with WeaponChance
Reply With Quote #7

Thanks for all! Here one example of the block.

PHP Code:
actionWeaponChance(id)
{    
        if (
is_user_alive(id) && !WeaponChanceUser[id] && get_user_team(id) == 1)     
    {
        
get_user_name(idweaponname32);
        switch (
random_num(02)) 
        { 
            case 
0show_hudmessage(0"[WeaponChance Block] A %s le toco una p228"weaponname);
        
give_item(id"weapon_p228");
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_p228"id), 2);
            case 
1show_hudmessage(0"[WeaponChance Block] A %s le toco una Scout"weaponname);
        
give_item(id"weapon_scout");
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_scout"id), 1);
            case 
2show_hudmessage(0"[WeaponChance Block] A %s le toco una He"weaponname);
        
give_item(id"weapon_hegrenade");
        
cs_set_weapon_ammo(find_ent_by_owner(1"weapon_hegrenade"id), 2);
        }  
    }

It's okey?
lagaar 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 03:30.


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