[HELP] Confused
#1

i made a simple kick and ban command which it kicks and ban.... is there a way to use " Kick(playerid) " and "Ban(playerid)" without the user being logged in rcon?

because i'm making some admin commands.... and when the " admins " tried the command /kick it say:

" /kick: You are not an admin! "
" /ban: You are not an admin! "

here's the commands:
Код:
	if(strcmp(cmd,"/kick", true) == 0)
	{
	  tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))
	  {
	    SendClientMessage(playerid,COLOR_WHITE,"USAGE: /kick [playerid]");
	    return 1;
		}
		giveplayerid = strval(tmp);
		if(PlayerInfo[giveplayerid][admin] == 1)
		{
		  SendClientMessage(playerid,COLOR_BRIGHTRED,"SAC: You cannot kick an admin!");
		  return 1;
		}
		if(PlayerInfo[playerid][admin] == 1)
	  {
			format(string, sizeof(string),"SAC: Admin %s kicked %s.",PlayerInfo[playerid][name],PlayerInfo[giveplayerid][name]);
			SendClientMessageToAll(COLOR_BRIGHTRED,string);
			Kick(giveplayerid);
			return 1;
		}
		return 1;
	}
	if(strcmp(cmd,"/ban", true) == 0)
	{
	  tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))
	  {
	    SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ban [playerid]");
	    return 1;
		}
		giveplayerid = strval(tmp);
		if(PlayerInfo[giveplayerid][admin] == 1)
		{
		  SendClientMessage(playerid,COLOR_BRIGHTRED,"SAC: You cannot ban an admin!");
		  return 1;
		}
		if(PlayerInfo[playerid][admin] == 1)
		{
		  format(string, sizeof(string),"SAC: Admin %s banned %s.",PlayerInfo[playerid][name],PlayerInfo[giveplayerid][name]);
		  SendClientMessageToAll(COLOR_BRIGHTRED,string);
			Ban(giveplayerid);
			return 1;
		}
		return 1;
	}
i don't wish to give the rcon password to admins... ( i wish to keep it for myself that's why i make the commands )

Please note, that if the person that use this command log in rcon it works fine.
but since there is no " LogPlayerInRcon(playerid); " i cannot log ppl in rcon without telling them the password...
Reply


Messages In This Thread
[HELP] Confused - by silvan - 19.09.2009, 13:35
Re: [HELP] Confused - by _Vortex - 19.09.2009, 14:17
Re: [HELP] Confused - by silvan - 19.09.2009, 14:29
Re: [HELP] Confused - by Memoryz - 19.09.2009, 14:37
Re: [HELP] Confused - by silvan - 19.09.2009, 14:39
Re: [HELP] Confused - by Memoryz - 19.09.2009, 14:40
Re: [HELP] Confused - by silvan - 19.09.2009, 14:56
Re: [HELP] Confused - by _Vortex - 19.09.2009, 15:01
Re: [HELP] Confused - by Memoryz - 19.09.2009, 15:15
Re: [HELP] Confused - by Doppeyy - 19.09.2009, 15:35

Forum Jump:


Users browsing this thread: 1 Guest(s)