Raised This Month: $ Target: $400
 0% 

Help with this plugin..


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 05-01-2006 , 20:04  
Reply With Quote #3

So does this look good?

Code:
#include <amxmodx>   #include <amxmisc>   #include <fun>   #define PLUGIN "Stuck"   #define VERSION "1.0"   #define AUTHOR "SweatyBanana"   new stuck[33]; new g_secondTime[33]; public plugin_init()   {       register_plugin(PLUGIN, VERSION, AUTHOR)       register_cvar("stuck_time", "5")     register_cvar("anounce_Time","60")     register_clcmd("say_team /stuck", "cmd_stuck")     register_clcmd("say /stuck", "cmd_stuck")     set_task(20.0,"advertise");     register_logevent("round_start", 2, "0=World triggered", "1=Round_Start"); } public round_start() {     for(new id = 1; id <= 32; id++)        stuck[id] = 0; } public cmd_stuck(id) {     new Time = get_cvar_num("stuck_time");     new firstTime = floatround(get_gametime());     if(firstTime - g_secondTime[id] < Time)     {         client_print(id , print_chat , "[AMXX] You can only do that command every %i seconds!", Time);         return PLUGIN_HANDLED;     }     g_secondTime[id] = floatround(get_gametime());     return PLUGIN_HANDLED; } /************************************************************************ public cmd_stuck()   {       new Time = get_cvar_num("stuck_time");         new id;         if(!is_user_alive(id))        client_print(id, print_chat, "[STUCK] you can only use /stuck if you are alive!")             else if(stuck[id] >= Time)        client_print(id, print_chat, "[STUCK] you can only use /stuck every %i second(s)", Time)             else     {         set_user_noclip (id, 1)         set_task(get_cvar_float("Time"),"unclip");         client_print(id, print_chat, "[STUCK] You have %i second(s) until becoming solid again.", Time);     }     return PLUGIN_HANDLED; } ************************************************************************/ public unclip() {     new id;     set_user_noclip (id) } public advertise() {     client_print(0,print_chat,"[STUCK] say /stuck to become a 'ghost'")     set_task(get_cvar_float("anounce_Time"),"advertise")     return PLUGIN_HANDLED }
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
 



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 05:12.


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