Order /fakeban
#1

On my server is not that comand / akeban, how do I have to? I wish only the admins to use that comanda
Thanks in advance
Reply
#2

What does this suppose to do?
Reply
#3

I don't have this command on the server: /fakeban for admins
Reply
#4

Quote:
Originally Posted by monster010
I don't have this command on the server: /fakeban for admins
You said that in first post.

Quote:
Originally Posted by MenaceX^
What does this suppose to do?
Reply
#5

just kicks player from the server and tell him it's banned
Reply
#6

Founded this on TCSOLS.PWN

Код:
	if(strcmp(cmd, "/fakeban", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	  	tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /fakeban [playerid/PartOfName] [reason]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1)
			{
			  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[64];
						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: /fakeban [playerid/PartOfName] [reason]");
							return 1;
						}
						new year, month,day;
						getdate(year, month, day);
						format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
						format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", giveplayer, sendername, (result));
						SendClientMessageToAll(COLOR_LIGHTRED, string);
					}
				}//not connected
			}
			else
			{
				format(string, sizeof(string), "  %d is not an active player.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
			}
		}
		return 1;
	}
Reply
#7

You could've use any /ban command, just remove the Ban(playerid);
Reply
#8

You could also add in the ban message the server sends when a player gets banned, although you'd have to get the correct shade of orange for it. "Server closed connection."
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)