22.08.2011, 19:11
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;
}