18.09.2017, 15:36
hi how to finish ban system - MYSQL R41-2
CODE::
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; }