How to disable other commands in one commands?
#7

Try this...
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new bool:deathmath_db[MAX_PLAYERS];
    if(deathmath_db[playerid])
    {
        if(!strcmp(cmdtext,"/cdm", true))  // type /cdm to get out of the DM area boolean (false)
        {
            SendClientMessage(playerid, -1, "You can use commands now.");
            deathmath_db[playerid] = false;
            return 1;
        }
        else
        {
            SendClientMessage(playerid, -1, "You're in DM area...");
        }      
        return 1;
    }
    if(!strcmp(cmdtext, "/dm", true))
    {
        //SetPlayerPos(playerid, x, y, z); Coords x, y, z from DM local...
        deathmath_db[playerid] = true;
        return 1;  
    }

    //Others commands by GameMode...
    return 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)