Code:
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_MAXSPEED 128
public admin_speedstop(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","0");
return PLUGIN_HANDLED;
}
public admin_speednorm(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","320");
return PLUGIN_HANDLED;
}
public plugin_init() {
plugin_registercmd("admin_speednorm","admin_speednorm",ACCESS_MAXSPEED,"admin_speednorm: sv_maxspeed 320");
plugin_registercmd("admin_speedstop","admin_speedstop",ACCESS_MAXSPEED,"admin_speedstop: sv_maxspeed 0");
return PLUGIN_CONTINUE;
}