08.04.2018, 13:45
(
Последний раз редактировалось kovac; 08.04.2018 в 14:39.
)
PHP код:
new bool:IsInDM[MAX_PLAYERS];
//You can create a variable and make it true when player enters DM, and false on exit and disconnect.
//So the code should be like this;
public OnPlayerCommandPerformed(playerid, cmdtext[ ], success)
{
if(success == 0) return SendClientMessage(playerid, -1, "ERROR: This command does not exist.");
if(IsInDM[playerid]) return SendClientMessage(playerid, -1, "ERROR: You can't use commands while in DM.");
return 1;
}