float infobartime = stof(argv(3));
string successful, t;
+ successful = string_null;
if((targets) && (admin_message))
{
if(successful)
bprint("Successfully sent message '", admin_message, "' to ", successful, ".\n");
else
- print("No players given (", original_targets, ") could recieve the message.\n");
+ print("No players given (", original_targets, ") could receive the message.\n");
return;
}
{
entity client;
string reason = argv(1);
- float i;
+ float i = 0;
FOR_EACH_REALPLAYER(client)
{
}
}
-void GameCommand_bot_cmd(float request, float argc)
+void GameCommand_bot_cmd(float request, float argc, string command)
{
switch(request)
{
if(bot == world)
bot = find_bot_by_name(argv(2));
if(bot)
- bot_queuecommand(bot, strcat(argv(3), " ", argv(4)));
+ bot_queuecommand(bot, substring(s, argv_start_index(3), -1));
}
}
else
bot = find_bot_by_name(argv(1));
if(bot)
{
- print(strcat("Command '", strcat(argv(2), " ", argv(3)), "' sent to bot ", bot.netname, "\n"));
- bot_queuecommand(bot, strcat(argv(2), " ", argv(3)));
+ print(strcat("Command '", substring(command, argv_start_index(2), -1), "' sent to bot ", bot.netname, "\n"));
+ bot_queuecommand(bot, substring(command, argv_start_index(2), -1));
return;
}
else
case CMD_REQUEST_COMMAND:
{
entity client;
- float i;
+ float i = 0;
float argc;
FOR_EACH_CLIENT(client)
string notify = argv(3);
string successful, t;
+ successful = string_null;
// lets see if the target(s) even actually exist.
if((targets) && (destination))
{
if(teamplay)
{
- entity tmp_player, client;
- float i, x, z, t_teams, t_players, team_color, accepted;
+ entity tmp_player;
+ float i, x, z, t_teams, t_players, team_color;
// count the total amount of players and total amount of teams
+ t_players = 0;
+ t_teams = 0;
FOR_EACH_PLAYER(tmp_player)
{
CheckAllowedTeams(tmp_player);
{
if(argv(2))
{
- entity client = GetIndexedEntity(argc, 1));
+ entity client = GetIndexedEntity(argc, 1);
float accepted = VerifyClientEntity(client, TRUE, FALSE);
if(accepted > 0)
{
rint(42); // do an engine breakpoint on VM_rint so you can get the trace that errnoeously returns startsolid
tracebox(start, PL_MIN, PL_MAX, end, MOVE_NOMONSTERS, world);
- tracebox(p, PL_MIN, PL_MAX, q, MOVE_NOMONSTERS, world);
if(trace_startsolid)
{
SERVER_COMMAND("allspec", GameCommand_allspec(request, arguments), "Force all players to spectate") \
SERVER_COMMAND("anticheat", GameCommand_anticheat(request, arguments), "Create an anticheat report for a client") \
SERVER_COMMAND("bbox", GameCommand_bbox(request), "Print detailed information about world size") \
- SERVER_COMMAND("bot_cmd", GameCommand_bot_cmd(request, arguments), "Control and send commands to bots") \
+ SERVER_COMMAND("bot_cmd", GameCommand_bot_cmd(request, arguments, command), "Control and send commands to bots") \
SERVER_COMMAND("cointoss", GameCommand_cointoss(request, arguments), "Flip a virtual coin and give random result") \
SERVER_COMMAND("database", GameCommand_database(request, arguments), "Extra controls of the serverprogs database") \
SERVER_COMMAND("defer_clear", GameCommand_defer_clear(request, arguments), "Clear all queued defer commands for a specific client") \
print(((command != "") ? strcat("Unknown server command \"", command, "\"") : "No command provided"), ". For a list of supported commands, try sv_cmd help.\n");
return;
-}
\ No newline at end of file
+}