Here is some code for #1 as well as #2.
PHP Code:
int = GetRandomInt(0,2)
switch (int)
{
case 0:
{
PrintToChat("This is message a");
}
case 1:
{
PrintToChat("This is message b");
}
case 2:
{
PrintToChat("I can keep going forever!");
}
}
PHP Code:
BypassAndExecuteCommand(Client, "give", "first_aid_kit");
/**
* Bypasses the sv_cheats to use command
* Thanks to Damizean
*
* @param: Client - The Client to execute the command on
* @string: strCommand - The command to execute
* @string: strParam1 - Parameter of the command
*
*/
BypassAndExecuteCommand(Client, String: strCommand[], String: strParam1[])
{
new Flags = GetCommandFlags(strCommand);
SetCommandFlags(strCommand, Flags & ~FCVAR_CHEAT);
FakeClientCommand(Client, "%s %s", strCommand, strParam1);
SetCommandFlags(strCommand, Flags);
}
For #3 you could either remove the cheat flag from the cvars you want them to use or if possible try and catch what they type into console and then bypass the cheat flag and execute the command. I am not sure the latter will work as I don't know if you can hook what a player types into the console.