Quick Qestion on BanEx
#1

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)..
Reply
#2

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!");
Reply
#3

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.
Reply
#4

You can add it to reason

pawn Код:
BanEx(playerid, "Anti Cheat - Hacks");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)