#include <core> #include <console> #include <string> #include <admin> #include <adminlib> new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.0"; public admin_cheats(HLCommand,HLData,HLUserName,UserIndex) { new Command[MAX_COMMAND_LENGTH]; new Data[MAX_DATA_LENGTH]; new User[MAX_NAME_LENGTH]; convert_string(HLCommand,Command,MAX_COMMAND_LENGTH); convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); execute_command(User,Command,"sv_cheats",Data); return PLUGIN_HANDLED; } public admin_maxspeed(HLCommand,HLData,HLUserName,UserIndex) { new Command[MAX_COMMAND_LENGTH]; new Data[MAX_DATA_LENGTH]; new User[MAX_NAME_LENGTH]; convert_string(HLCommand,Command,MAX_COMMAND_LENGTH); convert_string(HLData,Data,MAX_DATA_LENGTH); convert_string(HLUserName,User,MAX_NAME_LENGTH); execute_command(User,Command,"sv_maxspeed",Data); return PLUGIN_HANDLED; } public plugin_init() { plugin_registerinfo("plugin_sharp_echo","Allows you to edit sv_maxspeed and sv_cheats on server",STRING_VERSION); plugin_registercmd("admin_cheats","admin_cheats",ACCESS_KICK,"admin_cheats <1|0> : Turns on and off sv_cheats allowed of not"); plugin_registercmd("admin_maxspeed","admin_maxspeed",ACCESS_KICK,"admin_maxspeed <speed> : Allows you to cheange maxpseed max 400 default 320"); return PLUGIN_CONTINUE; }