Raised This Month: $ Target: $400
 0% 

Strange Bug plz help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Anthraxnz
Senior Member
Join Date: May 2005
Location: New Zealand
Old 06-07-2005 , 08:32   Strange Bug plz help
Reply With Quote #1

I written this script for users in my clan to start wars ect with but there is a strange bug in it, when ever you run the script it works but you cant say anything, only in team_say can you talk.
under normal say nothing shows up, i have no idea whats going on so please help.

Code:
//Author:   Anthrax //Date:     07 June 2005 /* Commands     amx_war - Starts the script     say /password - shows the server password     say /nopassword - removes the password     say /generate - generates a new password     say /war - starts a war     say /restore - restores server back to normal */ #include <amxmodx> #include <amxmisc> new Plugin[] = "War Script" new Author[] = "AnthraX" new Version[] = "2.0" public plugin_init() {     register_plugin(Plugin,Version,Author)     register_concmd("amx_war","cmd_war",ADMIN_MAP," Starts a war on the server")     register_clcmd("say","check_input",ADMIN_MAP,"Checks for input") } //---------------------------------------------------------------------------------------- public cmd_war(id,level,sid) {     if ( ! cmd_access(id,level,sid,0))     {         console_print(id,"You have no access to that command")         return PLUGIN_HANDLED     }     set_cvar_string("mp_friendlyfire","1")     set_cvar_string("mp_forcechasecam","2")     set_cvar_string("mp_freezetime","10")     set_cvar_string("mp_Autokick","0")     set_cvar_string("mp_AutoTeambalance","0")     set_cvar_string("mp_Limitteams","0")     set_cvar_string("mp_timelimit","60")     set_cvar_string("mp_buytime",".5")     set_cvar_string("mp_c4timer","35")     set_cvar_string("mp_fadetoblack","0")     set_cvar_string("mp_autocrosshair","0")     set_cvar_string("mp_flashlight","1")     set_cvar_string("mp_fraglimit","0")     set_cvar_string("mp_maxrounds","0")     set_cvar_string("mp_tkpunish","0")     set_cvar_string("mp_winlimit","0")     set_cvar_string("mp_maxrounds","0")     set_cvar_string("sv_gravity","800")     set_cvar_string("sv_alltalk","0")     set_cvar_string("sv_aim","0")     set_cvar_string("sv_cheats","0")     set_cvar_string("pausable","0")         set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)     show_hudmessage(0,"Live In 3 Restarts")             set_task(3.0, "restart")         set_task(6.0, "restart")     set_task(9.0, "restart")         set_task(11.0, "live")     set_task(14.0, "password_generator")     return PLUGIN_HANDLED } //---------------------------------------------------------------------------------------- public check_input(id,level,sid) {     if ( ! cmd_access(id,level,sid,0))     {         client_print(id, print_chat,"You have no access to that command")         return PLUGIN_HANDLED     }     new message[20]     read_args(message,18)     remove_quotes(message)             if (containi(message,"/password")!= -1)     {         cmd_pw(id)     }     if(containi(message,"/generate") != -1)     {         password_generator()     }     if(containi(message,"/nopassword") != -1)     {         cmd_nopw()     }     if(containi(message,"/warhelp") != -1)     {          show_motd(id, "addons/amxmodx/configs/warhelp.txt")     }     if(containi(message,"/war") != -1)     {         cmd_war(id,level,sid)     }     if(containi(message,"/restore") != -1)     {         cmd_unwar(id,level,sid)     }     return PLUGIN_HANDLED     } //---------------------------------------------------------------------------------------- public restart() {     set_cvar_string("sv_restart","1") } //---------------------------------------------------------------------------------------- public live() {     set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)     show_hudmessage(0,"Live Go Go Go")     show_hudmessage(0,"Live Go Go Go")     show_hudmessage(0,"Live Go Go Go") } //---------------------------------------------------------------------------------------- public password_generator() {     new password[6]             num_to_str(random_num( 0,9 ), password[0], 1)     num_to_str(random_num( 0,9 ), password[1], 1)     num_to_str(random_num( 0,9 ), password[2], 1)     num_to_str(random_num( 0,9 ), password[3], 1)     num_to_str(random_num( 0,9 ), password[4], 1)     set_cvar_string("sv_password", password)     client_print(0, print_chat, "Server Password is: %s",password)     client_print(0, print_chat, "Server Password is: %s",password)     client_print(0, print_chat, "Server Password is: %s",password)     client_print(0, print_chat, "Server Password is: %s",password)     client_print(0, print_chat, "Server Password is: %s",password)          return PLUGIN_HANDLED   } //---------------------------------------------------------------------------------------- public cmd_pw(id) {     new password[6]     get_cvar_string("sv_password",password,6)     client_print(id, print_chat,"Server Password is: %s",password)     client_print(id, print_chat,"Server Password is: %s",password)     client_print(id, print_chat,"Server Password is: %s",password) } //---------------------------------------------------------------------------------------- public cmd_nopw() {     set_cvar_string("sv_password","")     client_print(0, print_chat, "Server Password Has Been Removed %s")     client_print(0, print_chat, "Server Password Has Been Removed %s")     client_print(0, print_chat, "Server Password Has Been Removed %s") } //---------------------------------------------------------------------------------------- public cmd_unwar(id,level,sid) {     if ( ! cmd_access(id,level,sid,0))     {         console_print(id,"You have no access to that command")         return PLUGIN_HANDLED     }     set_cvar_string("mp_friendlyfire","0")     set_cvar_string("mp_forcechasecam","0")     set_cvar_string("mp_freezetime","6")     set_cvar_string("mp_Autokick","1")     set_cvar_string("mp_AutoTeambalance","1")     set_cvar_string("mp_Limitteams","0")     set_cvar_string("mp_timelimit","30")     set_cvar_string("mp_buytime",".5")     set_cvar_string("mp_c4timer","35")     set_cvar_string("mp_fadetoblack","0")     set_cvar_string("mp_autocrosshair","0")     set_cvar_string("mp_flashlight","1")     set_cvar_string("mp_fraglimit","0")     set_cvar_string("mp_maxrounds","0")     set_cvar_string("mp_tkpunish","1")     set_cvar_string("mp_winlimit","0")     set_cvar_string("mp_maxrounds","0")     set_cvar_string("sv_gravity","800")     set_cvar_string("sv_alltalk","0")     set_cvar_string("sv_aim","0")     set_cvar_string("sv_cheats","0")     set_cvar_string("pausable","0")         set_hudmessage(0, 200, 0, -1.0, 0.40, 0, 6.0, 6.0, 0.1, 0.1, 1)     show_hudmessage(0,"Restoring Server")         set_cvar_string("sv_password","")     set_cvar_string("sv_restart","1")         client_print(0,print_chat,"Server Password Removed %s")     client_print(0,print_chat,"Server Password Removed %s")         return PLUGIN_HANDLED } //----------------------------------------------------------------------------------------
Anthraxnz 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 16:35.


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