 |
|
Junior Member
|

06-15-2009
, 09:12
Re: Weapon chance HELP
|
#8
|
Quote:
Originally Posted by Xellath
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(PLUGIN, VERSION, AUTHOR); 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 = 1; id <= gMaxPlayers; id++) { if(is_user_connected(id) && is_user_alive(id)) { if(random_num(0, 100) <= 25) { give_item(id, "weapon_hegrenade"); client_print(id, print_chat, "You got a HE! (25%% chance)"); } } } }
|
How to add a deagle there?
|
|
|
|