- 0
[Help] afisare sanctiuni
-
Similar Content
-
- 0 answers
- 558 views
-
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
Rayan
Salut, am o comanda /last punish cu care verific fiecarui jucator sanctiunile.
Problema este ca nu afiseaza corect id-ul sanctiuni din baza de date, poza: https://imgur.com/a/ZpQyL
cod-ul este acesta:
if(strcmp(list,"punish",true) == 0) { new iddd; if(id != -1) { format(query, sizeof(query), "SELECT * FROM `punishlogs` WHERE `playerid`='%d' ORDER BY `ID` DESC LIMIT %d", PlayerInfo[id][pSQLID], lines); new Cache: resultt = mysql_query(SQL, query); for(new i, j = cache_get_row_count (); i != j; ++i) { iddd = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "time", result); format(test, 300, result); cache_get_field_content(i, "reason", result); format(reason, 300, result); actionid = cache_get_field_content_int(i, "actionid"); actiontime = cache_get_field_content_int(i, "actiontime"); cache_get_field_content(i, "playername", result); format(name, 30, result); cache_get_field_content(i, "givername", result); format(name2, 30, result); if(actionid == 1) { format(string,sizeof(string),"(#%d) %s[%s] Ban: %s has been permanent banned by %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 2) { format(string,sizeof(string),"(#%d) %s[%s] Ban: %s has been banned by %s for %d days, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 3) { format(string,sizeof(string),"(#%d) %s[%s] IP Ban: %s has been permanent banned by %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 4) { format(string,sizeof(string),"(#%d) %s[%s] IP Ban: %s has been banned by %s for %d days, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 5) { format(string,sizeof(string),"(#%d) %s[%s] Warn: %s received a warn from admin %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 6) { format(string,sizeof(string),"(#%d) %s[%s] Jail: %s was jailed by %s for %d minutes, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 7) { format(string,sizeof(string),"(#%d) %s[%s] Mute: %s has been muted by %s for %d minutes, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 8) { format(string,sizeof(string),"(#%d) %s[%s] %s was released from jail by admin %s, reason: %s.\n",iddd,string,test,name,name2,reason); } } cache_delete(resultt); ShowPlayerDialog(playerid,DIALOG_LASTS,DIALOG_STYLE_MSGBOX,"punish for player",string,"Close",""); } else { format(query, sizeof(query), "SELECT * FROM `punishlogs` ORDER BY `ID` DESC LIMIT %d", lines); new Cache: resultt = mysql_query(SQL, query); for(new i, j = cache_get_row_count (); i != j; ++i) { iddd = cache_get_field_content_int(i, "id"); cache_get_field_content(i, "time", result); format(test, 300, result); cache_get_field_content(i, "reason", result); format(reason, 300, result); actionid = cache_get_field_content_int(i, "actionid"); actiontime = cache_get_field_content_int(i, "actiontime"); cache_get_field_content(i, "playername", result); format(name, 30, result); cache_get_field_content(i, "givername", result); format(name2, 30, result); if(actionid == 1) { format(string,sizeof(string),"(#%d) %s[%s] Ban: %s has been permanent banned by %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 2) { format(string,sizeof(string),"(#%d) %s[%s] Ban: %s has been banned by %s for %d days, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 3) { format(string,sizeof(string),"(#%d) %s[%s] IP Ban: %s has been permanent banned by %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 4) { format(string,sizeof(string),"(#%d) %s[%s] IP Ban: %s has been banned by %s for %d days, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 5) { format(string,sizeof(string),"(#%d) %s[%s] Warn: %s received a warn from admin %s, reason: %s.\n",iddd,string,test,name,name2,reason); } else if(actionid == 6) { format(string,sizeof(string),"(#%d) %s[%s] Jail: %s was jailed by %s for %d minutes, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 7) { format(string,sizeof(string),"(#%d) %s[%s] Mute: %s has been muted by %s for %d minutes, reason: %s.\n",iddd,string,test,name,name2,actiontime,reason); } else if(actionid == 8) { format(string,sizeof(string),"(#%d) %s[%s] %s was released from jail by admin %s, reason: %s.\n",iddd,string,test,name,name2,reason); } } cache_delete(resultt); ShowPlayerDialog(playerid,DIALOG_LASTS,DIALOG_STYLE_MSGBOX,"punish",string,"Close",""); } }Edited by Rayan4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now