SA-MP Forums Archive
/ban : You are not an admin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /ban : You are not an admin (/showthread.php?tid=185755)



/ban : You are not an admin - Lars_Frederiksen - 26.10.2010

how can I fix this, cause I am a 1337 on my server and it tells me this crap when I try and /kick or /ban, please help me fix this.


AW: /ban : You are not an admin - Extremo - 26.10.2010

It probably checks "IsAdmin", meaning you need to be rcon admin =)

/rcon login PASSWORD


Re: /ban : You are not an admin - Scenario - 26.10.2010

Okay, so you seriously think we'll be able to help you if you didn't post the /ban command from your script? Come on, think...


Re: /ban : You are not an admin - Haydz - 26.10.2010

i guess you're using the start sa-mp server?, if so /rcon login PASSWORD you can find your password in server.cfg if your not sure what it is.


Re: /ban : You are not an admin - Lars_Frederiksen - 26.10.2010

No I want to make it so that we dont have to fucking rcon login to ban, just like it use to be.


Re: /ban : You are not an admin - Scenario - 26.10.2010

Quote:
Originally Posted by Lars_Frederiksen
Посмотреть сообщение
No I want to make it so that we dont have to fucking rcon login to ban, just like it use to be.
Then show us the entire /ban command!


Re: /ban : You are not an admin - Lars_Frederiksen - 26.10.2010

It's not in my script I've been scripting since late 08' I'm just Introduced to this 0.3b scripting and it's a bit confusing for me, I just gotta get the hang of it, but if it's required to /rcon login to /ban or /kick someone then I guess that's how it's gonna work. I'm not sharing my /ban or /kick command cause their custom.


Re: /ban : You are not an admin - Scenario - 26.10.2010

Quote:
Originally Posted by Lars_Frederiksen
Посмотреть сообщение
It's not in my script I've been scripting since late 08' I'm just Introduced to this 0.3b scripting and it's a bit confusing for me, I just gotta get the hang of it, but if it's required to /rcon login to /ban or /kick someone then I guess that's how it's gonna work. I'm not sharing my /ban or /kick command cause their custom.
Obviously, you don't know what you're doing. When you make an account system, you could just make an account variable called "AdminLevel" and set it to whatever. Obviously, there's more to it, but 'eh... You don't need to log in and out of RCON, just to kick/ban somebody! Do you know how simple it is to make a /ban or /kick command? Why not share it...?


Re: /ban : You are not an admin - Kitten - 26.10.2010

i have had this problem to

goto server.cfg

remove base from fliterscripts because base has a /kick and a /ban command


Re: /ban : You are not an admin - Lars_Frederiksen - 26.10.2010

No I have a normal ban command, just as the one off the GF, I edited it, so that if a lower ranked admin kicks a higher ranked admin, it auto kicks em, and if a lower ranked admin trys to ban a higher ranked admin, it autobans them, and before I even put that system in, it was giving me that problem, here's the system without my addin.

Код:
	if(strcmp(cmd, "/ban", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 2)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        if(giveplayerid != INVALID_PLAYER_ID)
			        {
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						new length = strlen(cmdtext);
						while ((idx < length) && (cmdtext[idx] <= ' '))
						{
							idx++;
						}
						new offset = idx;
						new result[264];
						while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
						{
							result[idx - offset] = cmdtext[idx];
							idx++;
						}
						result[idx - offset] = EOS;
						if(!strlen(result))
						{
							SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /ban [playerid/PartOfName] [reason]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "Notice: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						BanLog(string);
						format(string, sizeof(string), "Notice: %s was banned by an admin, reason: %s", giveplayer, (result));
						SendClientMessageToAll(COLOR_LIGHTRED, string);
						format(string, sizeof(string), "Notice: %s was banned by %s", giveplayer, sendername);
						ABroadCast(COLOR_YELLOW,string,1);
						PlayerInfo[giveplayerid][pBanned] = 1;
						Ban(giveplayerid);
						return 1;
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "   %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}