05.08.2009, 13:33
pawn Код:
new IsPlayerInDM[MAX_PLAYERS];
/*when player goes to dm*/
IsPlayerInDM[playerid] = 1;
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/exitdm"))
{
IsPlayerInDM[playerid] = 0;
SetPlayerPos(playerid, outside of dm);
}
if(IsPlayerInDM[playerid] != 0) return SendClientMessage(playerid, COLOR_RED, "Sorry, you can't use commands while in a dm zone. Type /exitdm to leave it");
/*your other commands*/
}