Question DM
#2

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(playeridcmdtext[ ], 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;

I don't know if there is a way to make an exception for a command.
Reply


Messages In This Thread
Question DM - by Hunud - 08.04.2018, 13:04
Re: Question DM - by kovac - 08.04.2018, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)