Commands White Not Logged In
#9

There's no reason whatsoever to add an if-statement for every command. You're using ZCMD, it has some callbacks that you can use.

pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(!pStats[playerid][pAuth])
    {
        SendClientMessage(playerid, COLOR_YELLOW, "* "COL_WHITE"Using commands is "COL_LBLUE"prohibited "COL_WHITE"until after you're logged in.");
        return 0;
    }
    return 1;
}
That's a snippet from my GM.
Reply


Messages In This Thread
Commands White Not Logged In - by alexkillerul - 03.08.2013, 15:56
Re : Commands White Not Logged In - by Garwan50 - 03.08.2013, 16:09
Re: Commands White Not Logged In - by alexkillerul - 03.08.2013, 17:00
Re : Commands White Not Logged In - by Garwan50 - 03.08.2013, 17:33
Re: Commands White Not Logged In - by sarab_singh - 03.08.2013, 18:07
Re : Commands White Not Logged In - by Garwan50 - 03.08.2013, 18:13
Re: Commands White Not Logged In - by alexkillerul - 03.08.2013, 18:21
Re : Commands White Not Logged In - by Garwan50 - 03.08.2013, 18:33
Re: Commands White Not Logged In - by Scenario - 03.08.2013, 18:37
Re: Commands White Not Logged In - by DobbysGamertag - 03.08.2013, 20:44

Forum Jump:


Users browsing this thread: 2 Guest(s)