SA-MP Forums Archive
How do I do so the client message is written in the samp.ban ? - 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: How do I do so the client message is written in the samp.ban ? (/showthread.php?tid=331225)



How do I do so the client message is written in the samp.ban ? - OleKristian95 - 04.04.2012

How do I do so the ClientMessage is written beside the IP in the bans in the samp.ban file?

pawn Код:
SendClientMessage(playerid, red, "You are banned from this server!");
        format(string,sizeof(string),"|- %s has been Automaticly Re-Banned | Reason: Ban Evasion -|",PlayerName,playerid);
        SendClientMessageToAll(grey, string); print(string);
        SaveToFile("BanLog",string);  Ban(playerid);
Please help


Re: How do I do so the client message is written in the samp.ban ? - Steven82 - 04.04.2012

For info to be saved in the samp.ban file (words) you need to use BanEx.


pawn Код:
SendClientMessage(playerid, red, "You are banned from this server!");
        format(string,sizeof(string),"|- %s has been Automaticly Re-Banned | Reason: Ban Evasion -|",PlayerName,playerid);
        SendClientMessageToAll(grey, string); print(string);
        SaveToFile("BanLog",string);  BanEx(playerid, string); // BanEx(playerid, reason[]);
Hope thats what you mean.


Re: How do I do so the client message is written in the samp.ban ? - OleKristian95 - 04.04.2012

I tried adding the Ex but it still gave me an error..

edit: added ,string and it worked

thanks for the help!
+1


Re: How do I do so the client message is written in the samp.ban ? - Reklez - 04.04.2012

Would be better if you check if the ip is banned. then there you can just re-kick the player.
Instead of banning him twice for ban evading.


Re: How do I do so the client message is written in the samp.ban ? - OleKristian95 - 04.04.2012

Quote:
Originally Posted by Reklez
Посмотреть сообщение
Would be better if you check if the ip is banned. then there you can just re-kick the player.
Instead of banning him twice for ban evading.
I havent posted the part 1 of the code, it detects if a name is banned if it is and some player joins with that name the player will be banned again on his new IP