BAN system end!!
#1

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;
}
Reply
#2

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

I'm sorry, but I really need it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)