Hi,
I just set up a private CSGO server for me and couple of my friends and I would like to know how to set up some specific chat commands for it. For example, I'd like the server to run multiple different modes, so I'd like players to be able to easily vote/change the mode as they desire (!duelmode for 1v1 aim duel maps, !comp for competitive, !arms for armsrace etc, etc.) I've managed to put some kinds of cfg commands for admins, but the problem is I'd like regular users to be able to change the mode without giving them the admin privileges.
But so far with my googling abilities I've not gotten too far. For example I found a forum thread where user wanted a !warmupend command to end warmup and he was presented with this code:
Code:
#include <sourcemod>
#include <cstrike>
public OnPluginStart()
{
RegAdminCmd("sm_warmupend", Command_WarmupEnd, ADMFLAG_KICK, "stop the warmup");
RegAdminCmd("sm_warmupstart", Command_WarmupStart, ADMFLAG_KICK, "start the warmup");
}
public Action:Command_WarmupEnd(client, args)
{
PrintToChatAll("[SM] \x04Warmup ended");
ServerCommand("mp_warmup_end");
return Plugin_Handled;
}
public Action:Command_WarmupStart(client, args)
{
PrintToChatAll("[SM] \x04Warmup started");
ServerCommand("mp_warmup_start");
return Plugin_Handled;
}
But I don't understand where it is specified that this happens when someone types !warmup. What if I wanted to the same thing happening when I type !oogliyboogily. Since I can't see where inside the code the trigger is specified, it must be specified somewhere else in Sourcemod configs?
Anyway, my request is, that if you guys know some easy-to-follow tutorial (specifically for csgo) somewhere in the internet, that teaches how to set up custom plugins for servers, could you direct me in that general direction? :)
Thanks!