Raised This Month: $ Target: $400
 0% 

Weapon chance HELP


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
falken208
Junior Member
Join Date: Jul 2007
Old 06-15-2009 , 09:12   Re: Weapon chance HELP
Reply With Quote #8

Quote:
Originally Posted by Xellath View Post
Then just do a function that is called every round, do random_num, give em items. Done.

PHP Code:
#include <amxmodx>
#include <fun>
 
#define PLUGIN "Weapon Chance"
#define AUTHOR "Xellath"
#define VERSION "0.1"
 
new gMaxPlayers;
 
public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
 
    
register_event("HLTV""eventRoundStart""a""1=0""2=0");
 
    
gMaxPlayers get_maxplayers();
}
 
public 
eventRoundStart()
{
    
set_task(1.0"weapon_chance");
}
 
public 
weapon_chance()
{
    for(new 
id 1id <= gMaxPlayersid++)
    {
        if(
is_user_connected(id) && is_user_alive(id))
        {
            if(
random_num(0100) <= 25)
            {
                
give_item(id"weapon_hegrenade");
                
client_print(idprint_chat"You got a HE! (25%% chance)");
            }
        }    
    }


How to add a deagle there?
falken208 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 14:05.


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