Raised This Month: $ Target: $400
 0% 

Help with using command once per round


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
LittleDude
Member
Join Date: Dec 2004
Location: Selah, WA
Old 03-03-2006 , 22:44   Help with using command once per round
Reply With Quote #1

Alright, I got my plugin, and there's 1 last thing I want to add, and that is that you can only use the command once. When you use it, and get back to down to below 50 health, you can do the command again, I wanna limit it to 1 timer per every round, or 1 time per every 5 rounds, if thats possible. Maybe even like 1 per 15 min. My plugin is:

Code:
 /* Plugin generated by AMXX-Studio */ /* Credits: Kensai: helping me fix bugs and getting it working. Kraugh: helping me figure out how to reset model at player_spawn [ --<-@ ] Black Rose: helped me get the reset model at player_spawn to work */ #include <amxmodx> #include <amxmisc> #include <fun> #include <cstrike> #define PLUGIN "GorillaMode" #define VERSION "1.0" #define AUTHOR "LittleDude" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_event("ResetHUD","player_spawn","b");     register_clcmd("fullupdate","block");     set_task(60.0, "notify", 0, "", 0, "b")     register_clcmd("say /gorillame", "gorillathem")     register_clcmd("say_team /gorillame", "gorillathem")     register_cvar("amx_gorilla", "1") } public plugin_precache(){     precache_model("models/player/gorilla/gorilla.mdl")     return PLUGIN_CONTINUE } public gorillathem(id){     if(get_cvar_num("amx_gorilla") == 0)         return PLUGIN_HANDLED         if(!is_user_alive(id)){         client_print(id, print_chat, "[Gorilla] You are dead and cannot go Gorilla Mode!")         return PLUGIN_HANDLED     }         new health = get_user_health(id)         if(is_user_alive(id) && health >= 50){         client_print(id, print_chat, "[Gorilla] You have too much health to turn Gorilla Mode!")         return PLUGIN_HANDLED             }     else if(health < 50){         set_user_health(id, 250)         set_user_armor(id, 250)         give_item(id, "weapon_m249")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         give_item(id, "ammo_556natobox")         cs_set_user_model(id, "gorilla")             }         client_print(id, print_chat, "[Gorilla] You have gone Gorilla Mode!")     return PLUGIN_HANDLED } public notify(){     if(get_cvar_num("amx_gorilla") == 1)             client_print(0, print_chat, "[Gorilla] Gorilla Mode is running!")     return PLUGIN_HANDLED } public player_spawn(id) {     new model[32]     cs_get_user_model(id,model,31)         if(equali(model,"gorilla"))         cs_reset_user_model(id) } public block(id) {     return PLUGIN_HANDLED }
__________________
It is stupid to be stupid, and stupid to not be stupid
LittleDude is offline
Send a message via AIM to LittleDude
 



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 20:24.


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