SA-MP Forums Archive
BAN system end!! - 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 system end!! (/showthread.php?tid=641629)



BAN system end!! - BrnX - 18.09.2017

hi how to finish ban system - MYSQL R41-2

CODE::

Код:
CMD:ban(playerid, params[])
{
		new id[128];
		new indok[128];
		new nap[128];
		new ip[128];
        if(isnull(params))
        {
            SendClientMessage(playerid, -1,"Hasznбlat: /ban [ nap ] - [ уra ]");
            return 1;
        }
        if(!strcmp(params, "nap", true) || !strcmp(params, "napra", true))
        {

            GetPlayerName(playerid, banner, sizeof(banner));
			GetPlayerName(bannedid, banned, sizeof(banned));
     		GetPlayerIp(bannedid, ip, sizeof(ip));
        
            if(sscanf(params,"us[256]d",id,indok,nap )) return SendClientMessage(playerid,0xffbf00AA,"Hasznбlat: {ffffff}/ban nap [id/nйv] [indok] [napok szбma]");
	        new escape[128]; mysql_escape_string(query,escape);                                                   //ban_id // jatekos
			format(query,sizeof(query),"INSERT INTO banlista (ban_id,jatekos,ip,admin,indok,ban_ido,unban_ido) VALUES ('%d','%s','%s','%s','%s','%d','%d')",
			banned,
			id);
			
			mysql_tquery(SQL,query);
			
			format(string, sizeof(string), "*[BAN] %s bannolva lett %s бltal %d-nap-ra/re ", pName(id), pName(playerid),nap);
			SendClientMessageToAll(COLOR_TOMATO, string);
			BanLog(string);
        }
        if(!strcmp(params, "hours", true) || !strcmp(params, "hours", true))
        {

        }
        return 1;
}



Re: BAN system end!! - J0sh... - 18.09.2017

This is scripting help, not do my code for me.
This also looks like you have no idea what you're doing.
You copy&pasting something then asking us to finish it for you is not scripting help.


Re: BAN system end!! - BrnX - 18.09.2017

I'm sorry, but I really need it