SA-MP Forums Archive
I need this >>> Read This - 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: I need this >>> Read This (/showthread.php?tid=292530)



I need this >>> Read This - GAMER_PS2 - 24.10.2011

UPDATE:

Scroll Down And Find my Commend about the Ban

it explain anything ok from now on i will make my own command
not asking for others.

Anyway find my comment


Re: I need this >>> Read This - Infinity - 24.10.2011

But of course, would you want fries with that?
In all seriousness, you're basically asking us to make everything for you.
Don't be lazy, there are enough tutorials to help you make it yourself.


Re: I need this >>> Read This - [MWR]Blood - 24.10.2011

For example, you will find the ban system you want in this gamemode - https://sampforum.blast.hk/showthread.php?tid=279268


Re: I need this >>> Read This - GAMER_PS2 - 24.10.2011

i'm not lazy i'm just to busy so many hard works and the only hard for me is making ban checking


Re: I need this >>> Read This - GAMER_PS2 - 24.10.2011

Comeon More Advise


Re: I need this >>> Read This - Ensconce - 24.10.2011

Once again, stop trying to get people to do the work for you or just play on other servers. This board should only be for the people who take the time to at least learn the basics of pawn and not for people who just edit SendClientMessage lines and call themselves scripters.


Re: I need this >>> Read This - GAMER_PS2 - 24.10.2011

Dude two question i made a ban command
but it will ban the ip? and also how can i make
the ban checking i wrote in /ban command

pawn Code:
INI_Int(File,"Banned",1);
Now What? one more left i need ban checking
can someone give me an example format (Not asking for making)

anyway heres the ban command you can check it if the command bans the IP

pawn Code:
CMD:ban(playerid, params[])
{
    new pid;
    new ip[128];
    if(PlayerInfo[playerid][pAdmin] >= 3 || IsPlayerAdmin(playerid))
    {
        if(sscanf(params, "us[128]", pid, params[2])) return SendClientMessage(playerid,COLOR_RED, "USAGE: /ban <playerid/name> <reason>");
        if(pid == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected!");
        if(pid == playerid) return SendClientMessage(playerid,COLOR_RED, "ERROR: You cant ban yourself!");
        new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
        new year,month,day; getdate(year, month, day);
        new hour,minute,second; gettime(hour,minute,second);
        GetPlayerName(pid, paramname, sizeof(paramname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        format(string, sizeof(string), "Administrator %s has ban %s <Reason: %s> <Date: %d/%d/%d> <Time: %d:%d>",adminname,paramname, params[2],month,day,year,hour,minute);
        SendClientMessageToAll(COLOR_RED, string);
        format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(pid,COLOR_RED, string);
        format(string, sizeof(string), ""red"Administrator Bans You: %s\nTime: %d:%d\nDate: %d/%d/%d\nReason: %n\nNote:"white"If you are mistakely get banned go to our forums at [url]www.server.com\nand[/url] make unban appeal", adminname, params[2],hour,minute,month,day,year,params[2]);
        ShowPlayerDialog(pid,453, DIALOG_STYLE_MSGBOX,""white"Banned Info:",string,"Ok","");
        SendClientMessage(pid,COLOR_WHITE, "==============================================");
        format(string, sizeof(string), "You have been ban by Administrator %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(pid,COLOR_RED, string);
        SendClientMessage(pid,COLOR_RED, "Make unban appeal at our forums. www.server.com");
        SendClientMessage(pid,COLOR_WHITE, "==============================================");
        format(string, sizeof(string), "You ban %s <Reason: %s>", paramname, params[2]);
        SendClientMessage(playerid,COLOR_RED, string);
        SaveIn("BanLog",string);
        Ban(pid);
        format(ip,128,"%s**",ip);
        format(ip,128,"banip %s",ip);
        SendRconCommand(ip);
        new INI:File = INI_Open(UserPath(playerid));
        INI_WriteInt(File,"Banned",1);
        INI_Close(File);
        format(string,sizeof(string),"Administrator %s has banned %s",adminname,paramname);
        SendToAdmins(COLOR_GREY,string);
        format(string, sizeof(string), "Administrator %s has banned %s <Reason:%s>",adminname,paramname,params[2]);
        printf(string);
    }
    else return SendClientMessage(playerid,COLOR_RED, "ERROR: You must be Administrator Level 3 to use this command");
    return 1;
}



Re: I need this >>> Read This - GAMER_PS2 - 24.10.2011

Comeon Help me up


Re: I need this >>> Read This - SmiT - 24.10.2011

Yes, it will ban the IP. It should be:

format( ip, 128,"banip %s", params[ 2 ] );
SendRconCommand( ip );



Re: I need this >>> Read This - GAMER_PS2 - 25.10.2011

One question how to make that ban checking onplayerconnect checks if the player is banned