Remus_Alex Posted July 5, 2014 Posted July 5, 2014 Nume: Remus_AlexDescriere: Salutare.Am si eu o mica intrebare, de la o vreme imi tot intra jucatori cu coduri pe server, eu sau admini online ii banam si pe IP si pe Nume.Dar vad ca ei schimba IP si intra iar..Ar fi vreo metoda prin care as putea scapa de ei, adica sa le dau ban pe clasa de IP sau altfel doar sa le dau ban permanent si sa nu mai intre...???? :shocked: :shocked: https://www.youtube.com/watch?v=6S-BC8K484Y
DraveN Posted July 5, 2014 Posted July 5, 2014 POFTIM , dar vezi ca este mysql . pui undeva asta [pawn]forward LoadBanClass();public LoadBanClass(){ new Query[255]; format(Query, sizeof(Query), "SELECT * FROM banclass"); mysql_query(Query); maxim = mysql_store_result(); for(new idx = 1; idx <= maxim; idx++) { format(Query, sizeof(Query), "SELECT * FROM banclass WHERE id='%d'", idx); mysql_query(Query); // Querys the "Query" Variable. mysql_store_result(); // Stores the result from Query if(mysql_num_rows()) // Checks if theres anyrow. if(mysql_fetch_row_format(Query,"|")) // Splits the row { sscanf(Query, "p<|>e<is[255]>",BanData[idx]); } printf("* ID: %d | Clasa IPului: %s",idx, BanData[idx][xIp]); } return 1;}[/pawn] la OnPlayerConnect pui asta pe acolo LoadBanClass();apoi comenzile : [pawn]//-----------------------------------------Comanda-----------------------------------------// if(strcmp(cmd, "/banclasses", true) == 0) { if(PlayerData[playerid][pAdmin] >= 6) { for(new i=1;i<=maxim;i++) { format(string, 256, "%s", BanData[xIp]); SendClientMessage(playerid, COLOR_WHITE, string); } } } if(strcmp(cmd, "/banclass", true) == 0) { if(PlayerData[playerid][pAdmin] < 6) { return 1; } new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[255]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; for(new s = 0; s < num_words; s++) { new pos; while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++) { result = '*'; } } if(!strlen(result)) { SendUsage(playerid,"/banclass [ip]"); return 1; } if(strlen(result) < 3 || strlen(result) > 7) { SendUsage(playerid,"/banclass [ip]"); return 1; } if(strfind(result, "|", true) != -1) { SendClientMessage(playerid, COLOR_WHITE, "Server: {FF0000}ErroR."); return 1; } else { new done=0; new eliber = 0; for( new i = 1; i <= maxim; i++) { if(strfind(BanData[xIp],result, true) != -1) { done = i; i = maxim + 2; } if(strfind(BanData[xIp],"255.255", true) != -1) { eliber = i; i = maxim + 2; } } if(done > 0) { SendClientMessage(playerid, COLOR_WHITE, "Server: {FF0000}Aceasta clasa de ip este deja banata."); } else { if(eliber > 0) { new query[MAX_STRING]; maxim++; strmid(BanData[eliber][xIp], result, 0, strlen(result), 999); format(string, 256, "AdmWarning:{FFFFFF} %s a banat clasa de ip %s.", PlayerData[playerid][pNume], BanData[maxim][xIp]); ABroadCast(COLOR_LIGHTRED,string,1); format(query, sizeof(query), "UPDATE banclass SET iP='%s' WHERE id=%d", BanData[eliber][xIp], eliber); mysql_query(query); return 1; } else { new query[MAX_STRING]; maxim++; strmid(BanData[maxim][xIp], result, 0, strlen(result), 999); format(string, 256, "AdmWarning:{FFFFFF} %s a banat clasa de ip %s.", PlayerData[playerid][pNume], BanData[maxim][xIp]); ABroadCast(COLOR_LIGHTRED,string,1); format(query, sizeof(query), "INSERT INTO banclass (iP) VALUES ('%s')", BanData[maxim][xIp]); mysql_query(query); return 1; } } } }//-----------------------------------------Comanda-----------------------------------------// if(strcmp(cmd, "/unbanclass", true) == 0) { if(PlayerData[playerid][pAdmin] < 6) { return 1; } new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[255]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; for(new s = 0; s < num_words; s++) { new pos; while((pos = strfind(result,Swears,true)) != -1) for(new i = pos, j = pos + strlen(Swears); i < j; i++) { result = '*'; } } if(!strlen(result)) { SendUsage(playerid,"/unbanclass [ip]"); return 1; } if(strlen(result) < 3 || strlen(result) > 7) { SendUsage(playerid,"/unbanclass [ip]"); return 1; } if(strfind(result, "|", true) != -1) { SendClientMessage(playerid, COLOR_WHITE, "Server: {FF0000}ErroR."); return 1; } else { new done=0; for( new i = 1; i <= maxim; i++) { if(strfind(BanData[xIp], result, true) != -1) { done = i; i = maxim + 2; } } if(done == 0) { return 1; } new query[MAX_STRING]; strmid(BanData[done][xIp], "255.255", 0, 7, 999); format(string, 256, "AdmWarning:{FFFFFF} %s a scos banul de pe clasa de ip %s.", PlayerData[playerid][pNume], BanData[done][xIp]); ABroadCast(COLOR_LIGHTRED,string,1); format(query, sizeof(query), "UPDATE banclass SET iP='%s' WHERE id=%d", BanData[done][xIp], done); mysql_query(query); return 1; } }[/pawn]
Ph0eniX Posted July 7, 2014 Posted July 7, 2014 Topic inchis , 48h+ fara reply. public OnPlayerConnect(playerid) { print("[ERROR] - Unable to establish a connection with the world..."); SendRconCommand("exit"); return 1; }
Question
Remus_Alex
Nume: Remus_Alex
Descriere: Salutare.
Am si eu o mica intrebare, de la o vreme imi tot intra jucatori cu coduri pe server, eu sau admini online ii banam si pe IP si pe Nume.
Dar vad ca ei schimba IP si intra iar..
Ar fi vreo metoda prin care as putea scapa de ei, adica sa le dau ban pe clasa de IP sau altfel doar sa le dau ban permanent si sa nu mai intre...
???? :shocked: :shocked:
https://www.youtube.com/watch?v=6S-BC8K484Y
2 answers to this question
Recommended Posts