/fakeban - /fakekick How? - 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)
+--- Thread: /fakeban - /fakekick How? (
/showthread.php?tid=398312)
/fakeban - /fakekick How? -
Rydur - 09.12.2012
I would like to scare some of my users

,
How would i script those in without it actually kicking them?
Re: /fakeban - /fakekick How? -
Randy More - 09.12.2012
All you have to do is to code a command which sends a message to all active players or the specified one only.
pawn Код:
CMD:fkick(playerid, params[])
{
new name[MAX_PLAYER_NAME], tname[MAX_PLAYER_NAME], string[128], reason[64], target;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"You are not an administrator"); // Replace this with your variable which is responsible for saving the admin's level.
if(sscanf(params,"us[64]", target, reason)) return SendClientMessage(playerid, -1,"SYNTAX: /fkick [targetid] [reason]");
if(!IsPlayerConnected(target)) return SendClientMessage(playerid, -1,"There's no active player with this ID.");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(target, tname, sizeof(tname));
format(string, sizeof(string),"AdmWarn: %s has kicked %s from the server, reason: %s", name, tname, reason);
SendClientMessageToAll(-1, string);
return 1;
}
And so as for the ban command.
Re: /fakeban - /fakekick How? -
Rydur - 09.12.2012
Thanks man, I wasn't sure