/kick and /ban - not working -
Tagathron - 05.03.2014
I am checking out zGaming RP script, but when i try /kick and /ban in-game it gives me '/kick : You are not an admin' message (but i have made myself an admin, and other commands are working.)
I have checked the /kick and /ban commands,they seem fine, but i can not find '/kick : You are not an admin' anywhere in the script.
And i am not using any filterscripts.
What could it be?
(here is the /kick command code, in case that it might give you some sort of hint)
pawn Код:
CMD:kick(playerid, params[])
{
new playerb, string[128];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
if(sscanf(params, "us[128]", playerb, params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /kick [playerid] [reason]");
if(!IsPlayerConnected(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(IsPlayerNPC(playerb)) return SendClientMessage(playerid, COLOR_GREY, "You can't kick NPCs out of the server.");
if(PlayerInfo[playerid][pAdmin] < PlayerInfo[playerb][pAdmin]) return SendClientMessage(playerid, COLOR_GREY, "Player has a higher admin level than you."); format(string, sizeof(string), "AdmCmd: %s has been kicked by %s, reason: %s", RPN(playerb), RPN(playerid), params);
format(string, sizeof(string), "AdmCmd: %s has been kicked by %s, reason: %s", RPN(playerb), RPN(playerid), params);
SendClientMessageToAll(COLOR_LIGHTRED, string);
format(string, sizeof(string), "AdmCmd: %s has been kicked by %s (%s), reason: %s", RPN(playerb), RPN(playerid), RPIP(playerid), params);
Log("logs/kick.log", string);
Kick(playerb);
return 1;
}
Re: /kick and /ban - not working -
XK - 05.03.2014
Change it from kick to test then try /test ingame if it says the same thing then the problem is in the command and i will check it,if it works then you got something wrong in the gamemode and i will try to solve it
If it worked good then try /kick if it says the same thing then you got another thing jn the gamemode
Re: /kick and /ban - not working -
Necip - 05.03.2014
You had the "<" wrong. That command will work for normal players instead(Admin level < 1). Try this, change this:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
To this:
pawn Код:
if(PlayerInfo[playerid][pAdmin] > 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
Re: /kick and /ban - not working -
Tagathron - 05.03.2014
@Necip,no you're wrong.If i changed it to '>' then everyone could use the command.
Quote:
Change it from kick to test then try /test ingame if it says the same thing then the problem is in the command and i will check it,if it works then you got something wrong in the gamemode and i will try to solve it
If it worked good then try /kick if it says the same thing then you got another thing jn the gamemode
|
I have changed it to /test, and now the /test command behaves like /kick - but when i type /kick, it sends me the same message.
Re: /kick and /ban - not working -
XK - 05.03.2014
Lol no necip
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
It isnt wrong ,it means that if player adminlevel is lower than 1 he will get this message < means lower > means higher
Re: /kick and /ban - not working -
Necip - 05.03.2014
Could you please give it a try? I am sure it will work, or make yourself admin level 0 and test it.
Re: /kick and /ban - not working -
Tagathron - 05.03.2014
@Necip it won't work.And it wouldn't even help, because if i change /kick to /test, then the /test command behaves as /kick. But when i type /kick, it sends me that message again. (as i said already)
Re: /kick and /ban - not working -
Necip - 05.03.2014
EDIT: Oh, I just noticed what I did, I am sorry, will try to fix the command in other way.
Re: /kick and /ban - not working -
XK - 05.03.2014
Necip he doesnt have to try because you didnt help him,you gave him a wrong answer,tagathron zgaming got kick command can you give me your skype name so i can help you to solve it?
Re: /kick and /ban - not working -
Tagathron - 05.03.2014
Sorry,i just found out that i was actually using the 'base' filterscript which contains the /kick and /ban commands.
I will remove it and that will also remove the problem.
Thanks for trying to help anyways.