Skip to content

Commit

Permalink
feat: add guard for server command
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarrus1 committed Mar 14, 2023
1 parent 53c4e0b commit 4b380c1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripting/SurfTimer-discord.sp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ public void OnClientConnected(int iClient)

public Action CommandDiscordTest(int client, int args)
{

if (client == 0)
{
CReplyToCommand(0, "This command is only available in game.");
return Plugin_Handled;
}
CReplyToCommand(client, "{blue}[SurfTimer-Discord] {green}Sending main record test message.");
surftimer_OnNewRecord(client, 0, "00:00:00", "-00:00:00", -1);
CReplyToCommand(client, "{blue}[SurfTimer-Discord] {green}Sending bonus record test message.");
Expand Down

0 comments on commit 4b380c1

Please sign in to comment.