Commands White Not Logged In
#10

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
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.
Are you guys ingoring this? ^ that will work.

Or the way i do it:

pawn Код:
forward OnPlayeCommandPerformed(playerid,cmdtext[],success);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(IsSpawned[playerid]== false)
    {
        new string[100];
        format(string,sizeof(string),"{00FF00}%s{FF2800} cannot be used before you've spawned",cmdtext);
        return SendClientMessage(playerid,-1,string);
    }
    return 1;
}
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)