SA-MP Forums Archive
/ban help! - 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: /ban help! (/showthread.php?tid=355808)



/ban help! - DreamKillah - 01.07.2012

Alright so I have a /ban system but I don't think it works properly. If ever I ban somebody, I want their account is locked as well, so that whenever they change their IP and log back with their own name, it will say; " This account is locked " even their IP isn't banned anymore. It's because whenever I ban somebody ( high levels ) they can just get back to my server with their original accounts. Also can somebody tell me how can I make a /ban time.


Re: /ban help! - WillyP - 01.07.2012

Where's the original code for this?


Re: /ban help! - DreamKillah - 01.07.2012

Well I lied, I just wanna help the server I am admining into, I don't have the codes. I'm just a level 3 admin, I don't know how can I help the server I am with.

I just want a script for ban and shit, just the ban where in if I ban somebody, it'll lock their account and their IP, even they change their IP, they can't log back to their original accounts.


Re: /ban help! - Jarnu - 01.07.2012

thats probably possible only in one case which is /rangeban or the /rcon ban.. and Banning IP is not the solution..
though it will effect the players who have dynamic IP's and almost same as the Hacker's range.. and of course will affect the server's popularity.


Re: /ban help! - DreamKillah - 01.07.2012

Quote:
Originally Posted by Jarnu
Посмотреть сообщение
thats probably possible only in one case which is /rangeban or the /rcon ban.. and Banning IP is not the solution..
though it will effect the players who have dynamic IP's and almost same as the Hacker's range.. and of course will affect the server's popularity.
No, I don't want to use range ban, because yeah to what you have said. Just a simple /ban system, wherein the player's ORIGINAL ACCOUNT ( which I banned ) will be locked, and if ever he/she changed his/her IP, and log in with the original account. It won't let him/her logged in, instead it'll say; " This account is locked " then " Server Closed Connection ". I have seen servers with this kind of system ( 'cause I got banned by them ). So I hope you guys could really help me. Don't worry I'll give credits to you for the ban system.


Re: /ban help! - Jarnu - 01.07.2012

though .. for that i suggest you to use NameKick system..
example code
pawn Код:
if (dUserINT(PlayerName2(playerid)).("banned") == 1)
    {
        SendClientMessage(playerid, red, "This name is banned from this server!");
        format(string,sizeof(string),"%s ID:%d was auto kicked. Reason: Name banned from server",PlayerName,playerid);
        SendClientMessageToAll(grey, string);
     }
by the way thats not a Script request thread.. post this thingy here: https://sampforum.blast.hk/showthread.php?tid=187229


Re: /ban help! - LaGrande - 01.07.2012

i need to know that what kind of file saving system (aka INI writers) you are using.
The common and simplest and mostly used is dini. here goes the example with dini

pawn Код:
public OnPlayerConnect(playerid)
{
    new str[128];
    new name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(str, 128, "%s.ini", name);// instead of "%s.txt" locate your own folder to user accounts
    if(dini_Int(str, "Banned")==1)
    {
        SendClientMessage(playerid, 0xFF0000AA, "You are banned from this server");
        Kick(playerid);
    }
    return 1;
}
And add this in your ban command

pawn Код:
dini_IntSet(PlayerFile, "Banned", 1);



Re: /ban help! - DreamKillah - 03.07.2012

Thanks for everything, someone will help me. Thanks.