How to disable other commands in one commands?
#2

Like this?
pawn Код:
new bool:deathmath_db[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(deathmath_db[playerid])
        return SendClientMessage(playerid, -1, "You cannot use commands at Death Math area");
       
    if(!strcmp(cmdtext, "/dm", true))
    {
        SetPlayerPos(playerid, x, y, z...);
        return deathmath_db[playerid] = true;
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return deathmath_db[playerid] = false;
}
I didn't understand
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)