Posts: 1,241
Threads: 304
Joined: May 2012
Reputation:
0
Hi I would like to ask how I disabled all commands on character selection, except /admins or some other commands.
Coz I tried to use a command teleport and I teleported to that place while im in chacter selection and also to avoid getting bugged.
Posts: 285
Threads: 20
Joined: Jul 2013
Reputation:
0
There is mine if(Logged[playerid] == 0) return SendClientMessage(playerid, -1, "You need to login before executing a command!");
Edit: uhm too late.
Posts: 512
Threads: 121
Joined: Sep 2013
Quote:
Originally Posted by BenzoAMG
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.