how to disable all commands
#10

Quote:
Originally Posted by BenzoAMG
View Post
There is a quicker way, yes.

pawn Code:
if(pInfo[playerid][Spawned] == 0)
{
        if(strcmp(cmdtext,"/admins",true) == 0) return 1;
        SendClientMessage(playerid, -1, "You have to be logged in.");
        return 0;
}
Lets say you want to unblock /admins, /rules and the /help commands:

pawn Code:
if(pInfo[playerid][Spawned] == 0)
{
        if(strcmp(cmdtext,"/admins",true) == 0) return 1;
        if(strcmp(cmdtext,"/rules",true) == 0) return 1;
        if(strcmp(cmdtext,"/help",true) == 0) return 1;
        SendClientMessage(playerid, -1, "You have to be logged in.");
        return 0;
}
OR:
pawn Code:
if(pInfo[playerid][Spawned] == 0)
{
        if(strcmp(cmdtext,"/admins",true) == 0 || strcmp(cmdtext,"/rules",true) == 0 || strcmp(cmdtext,"/help",true) == 0) return 1;
        SendClientMessage(playerid, -1, "You have to be logged in.");
        return 0;
}
Tried and of course it works! Thank you! You really are helpful. Glad you understand me. With love <3 no homo.
Reply


Messages In This Thread
how to disable all commands - by kbalor - 22.10.2013, 14:55
Re: how to disable all commands - by Threshold - 22.10.2013, 15:03
Re: how to disable all commands - by ]Rafaellos[ - 22.10.2013, 15:05
Re: how to disable all commands - by Wizzy951 - 22.10.2013, 15:06
Re: how to disable all commands - by kbalor - 22.10.2013, 15:12
Re: how to disable all commands - by Threshold - 22.10.2013, 15:19
Re: how to disable all commands - by kbalor - 22.10.2013, 15:21
Re: how to disable all commands - by kbalor - 22.10.2013, 15:27
Re: how to disable all commands - by Threshold - 22.10.2013, 15:33
Re: how to disable all commands - by gotwarzone - 22.10.2013, 15:42

Forum Jump:


Users browsing this thread: 1 Guest(s)