Quick Qestion on BanEx - 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: Quick Qestion on BanEx (
/showthread.php?tid=256084)
Quick Qestion on BanEx -
Snipa - 18.05.2011
How do I make it so that when a player is banned, it tells who banned the player. I made a custom anti-cheat, so how do I make it so that in the ban, it tells what banned(not the reason)..
Re: Quick Qestion on BanEx -
Laronic - 18.05.2011
You cant recive info from BanEx, it means it cant tell you who banned you ect.
But if you use this
https://sampforum.blast.hk/showthread.php?tid=255118 (Advertising ftw)
and replace BanEx with "BanPlayer(playerid, "Anti-Cheat?", "reason");"
Then the banned player recive the ban info OnPlayerConnect
BanPlayer example:
BanPlayer(playerid, "SecretAdmin1337", "Ban message test!");
Re: Quick Qestion on BanEx -
grand.Theft.Otto - 19.05.2011
Lets say banName is the name of the person being banned, and player1 is the id of the banned player AND, lets say adminName is the person (admin) banning player1 and playerid would be the id of the admin:
pawn Код:
new player1;
new string[128];
new adminName[MAX_PLAYER_NAME]; GetPlayerName(playerid,adminName,sizeof(adminName));
new banName[MAX_PLAYER_NAME]; GetPlayerName(player1,banName,sizeof(banName));
format(string,sizeof(string),"%s (%d) Has Been Banned By Administrator %s (%d).",adminName,playerid,banName,player1);
SendClientMessageToAll(COLOR_PINK,string);
Now just try to put it into the dialog. You can change up some stuff in this code. If you don't understand, let me know.
Re: Quick Qestion on BanEx -
MadeMan - 19.05.2011
You can add it to reason
pawn Код:
BanEx(playerid, "Anti Cheat - Hacks");