when in /dm how to disable all cmds in a FS and gamemode
#3

pawn Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(string, "/dm", true) == 0)
    {
        //Do stuff here
        IsInDM[playerid] = 1;
    }
    if(strcmp(string, "/leave", true) == 0)
    {
        //Do stuff here
        IsInDM[playerid] = 0;
    }
    if(strcmp(string, "/hi", true) ==0)
    {
        //Put this in every command that you want to get disabled        
        if(IsInDM[playerid])
        {
            SendClientMessage(playerid, COLOR_RED, "You must /leave before you can use any command");
            return 1;
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)