SA-MP Forums Archive
Order /fakeban - 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: Order /fakeban (/showthread.php?tid=82601)



Order /fakeban - monster010 - 19.06.2009

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



Re: Order /fakeban - MenaceX^ - 19.06.2009

What does this suppose to do?


Re: Order /fakeban - monster010 - 19.06.2009

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


Re: Order /fakeban - Correlli - 19.06.2009

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?



Re: Order /fakeban - Serediucr - 19.06.2009

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


Re: Order /fakeban - pumpkin - 22.06.2009

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;
	}



Re: Order /fakeban - MenaceX^ - 23.06.2009

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


Re: Order /fakeban - Grim_ - 23.06.2009

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."