IonutB Posted April 11, 2020 Posted April 11, 2020 (edited) YCMD:staff(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 1) return va_SendClientMessage(playerid, COLOR_WHITE, AdminOnly); ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); return 1; } case DIALOG_STAFF: { if(!response) return 1; new szQuery[1024], szResult[1024], szDialog[1024], szDialog2[4000], Cache: result; new szPlayers, szPlayersT; new szName[180], szAdmin, szLastOn[180], x2, y, szTitle[180], warns, userID; switch(listitem) { case 0: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Admin`>'0' ORDER BY `users`.`Admin` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 256, szResult); cache_get_field_content(i, "Admin", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 256, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "AW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 256, "Online (%d)", userID); x2++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d on this week / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Admins (%d/%d)", GetStaffOnline(0), x2); } case 1: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Helper`>'0' ORDER BY `users`.`Helper` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 256, szResult); cache_get_field_content(i, "Helper", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 256, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "HW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 256, "Online (%d)", userID); y++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d today / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Helpers (%d/%d)", GetStaffOnline(1), y); } } ShowPlayerDialog(playerid, DIALOG_STAFF1, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Back"); } case DIALOG_STAFF1: { if(!response) return ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); } Nu imi merge comanda /staff, nu stiu ce are cand ii dau pe helpers, admins nu merge [01:52:53] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:53] [debug] Stack pointer (STK) is 0x3E76F00, heap pointer (HEA) is 0x3E7A700 [01:52:53] [debug] AMX backtrace: [01:52:53] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=0, inputtext[]=@03e7a6e4 "Admins") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 [01:52:54] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:54] [debug] Stack pointer (STK) is 0x3E76F00, heap pointer (HEA) is 0x3E7A704 [01:52:54] [debug] AMX backtrace: [01:52:54] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=1, inputtext[]=@03e7a6e4 "Helpers") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 [01:52:58] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:58] [debug] Stack pointer (STK) is 0x3E796E8, heap pointer (HEA) is 0x3E7A708 [01:52:58] [debug] AMX backtrace: Edited April 11, 2020 by IonutB
StrikerM Posted April 12, 2020 Posted April 12, 2020 Acum 12 ore, IonutB a spus: YCMD:staff(playerid, params[], help) { if(PlayerInfo[playerid][pAdmin] < 1) return va_SendClientMessage(playerid, COLOR_WHITE, AdminOnly); ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); return 1; } case DIALOG_STAFF: { if(!response) return 1; new szQuery[1024], szResult[1024], szDialog[1024], szDialog2[4000], Cache: result; new szPlayers, szPlayersT; new szName[180], szAdmin, szLastOn[180], x2, y, szTitle[180], warns, userID; switch(listitem) { case 0: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Admin`>'0' ORDER BY `users`.`Admin` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 256, szResult); cache_get_field_content(i, "Admin", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 256, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "AW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 256, "Online (%d)", userID); x2++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d on this week / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Admins (%d/%d)", GetStaffOnline(0), x2); } case 1: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Helper`>'0' ORDER BY `users`.`Helper` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 256, szResult); cache_get_field_content(i, "Helper", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 256, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "HW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 256, "Online (%d)", userID); y++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d today / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Helpers (%d/%d)", GetStaffOnline(1), y); } } ShowPlayerDialog(playerid, DIALOG_STAFF1, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Back"); } case DIALOG_STAFF1: { if(!response) return ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); } Nu imi merge comanda /staff, nu stiu ce are cand ii dau pe helpers, admins nu merge [01:52:53] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:53] [debug] Stack pointer (STK) is 0x3E76F00, heap pointer (HEA) is 0x3E7A700 [01:52:53] [debug] AMX backtrace: [01:52:53] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=0, inputtext[]=@03e7a6e4 "Admins") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 [01:52:54] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:54] [debug] Stack pointer (STK) is 0x3E76F00, heap pointer (HEA) is 0x3E7A704 [01:52:54] [debug] AMX backtrace: [01:52:54] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=1, inputtext[]=@03e7a6e4 "Helpers") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 [01:52:58] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [01:52:58] [debug] Stack pointer (STK) is 0x3E796E8, heap pointer (HEA) is 0x3E7A708 [01:52:58] [debug] AMX backtrace: Salut, in primul rand nu stiu daca este de la modul cum il ai tu aranjat, dar sarputea sa ai un dialog in altu-l, asta nu v-a exista si ai si 4000 string cand maxim este 1024, inlocuieste tot dialogul case DIALOG_STAFF cu ce iti dau eu, si pune case DIALOG_STAFF1 sub DIALOG_STAFF case DIALOG_STAFF: { if(!response) return 1; new szQuery[1024], szResult[1024], szDialog[1024], szDialog2[1024], Cache: result; new szPlayers, szPlayersT; new szName[180], szAdmin, szLastOn[180], x2, y, szTitle[180], warns, userID; switch(listitem) { case 0: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Admin`>'0' ORDER BY `users`.`Admin` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Admin", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "AW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); x2++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d on this week / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Admins (%d/%d)", GetStaffOnline(0), x2); } case 1: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Helper`>'0' ORDER BY `users`.`Helper` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Helper", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "HW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); y++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d today / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Helpers (%d/%d)", GetStaffOnline(1), y); } } ShowPlayerDialog(playerid, DIALOG_STAFF1, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Back"); } Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte. Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net. Aveti grija pe cine ajutati, majoritatea sunt caini.
IonutB Posted April 12, 2020 Author Posted April 12, 2020 (edited) [16:47:16] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [16:47:16] [debug] Stack pointer (STK) is 0x3E79D80, heap pointer (HEA) is 0x3E7A700 [16:47:16] [debug] AMX backtrace: [16:47:16] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=0, inputtext[]=@03e7a6e4 "Admins") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 [16:47:17] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [16:47:17] [debug] Stack pointer (STK) is 0x3E79D80, heap pointer (HEA) is 0x3E7A704 [16:47:17] [debug] AMX backtrace: [16:47:17] [debug] #0 00024554 in public OnDialogResponse (playerid=0, dialogid=0, response=1, listitem=1, inputtext[]=@03e7a6e4 "Helpers") at D:\Gamemode\pawno\include\YSI\y_hooks/impl.inc:2273 Tot imi apare asta, daca bag 1024, am copiat si dialog-ul si tot nu imi merge case DIALOG_STAFF1: { if(!response) return ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); } case DIALOG_STAFF: { if(!response) return 1; new szQuery[1024], szResult[1024], szDialog[1024], szDialog2[1024], Cache: result; new szPlayers, szPlayersT; new szName[180], szAdmin, szLastOn[180], x2, y, szTitle[180], warns, userID; switch(listitem) { case 0: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Admin`>'0' ORDER BY `users`.`Admin` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Admin", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "AW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); x2++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d on this week / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Admins (%d/%d)", GetStaffOnline(0), x2); } case 1: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Helper`>'0' ORDER BY `users`.`Helper` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Helper", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "HW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); y++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d today / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Helpers (%d/%d)", GetStaffOnline(1), y); } } ShowPlayerDialog(playerid, DIALOG_STAFF1, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Back"); } case DIALOG_STAFF: { if(!response) return 1; new szQuery[1024], szResult[1024], szDialog[1024], szDialog2[1024], Cache: result; new szPlayers, szPlayersT; new szName[180], szAdmin, szLastOn[180], x2, y, szTitle[180], warns, userID; switch(listitem) { case 0: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Admin`>'0' ORDER BY `users`.`Admin` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Admin", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "AW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); x2++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d on this week / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Admins (%d/%d)", GetStaffOnline(0), x2); } case 1: { format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `Helper`>'0' ORDER BY `users`.`Helper` ASC LIMIT 50"); result = mysql_query(SQL, szQuery); strcat(szDialog2, "Name\tStatus\tRaport\tWarns\n"); for(new i, j = cache_get_row_count (); i < j; i++) { cache_get_field_content(i, "name", szResult); format(szName, 21, szResult); cache_get_field_content(i, "Helper", szResult); szAdmin = strval(szResult); cache_get_field_content(i, "lastOn", szResult); format(szLastOn, 25, "Offline (%s)", szResult); cache_get_field_content(i, "HelpedPlayers", szResult); szPlayers = strval(szResult); cache_get_field_content(i, "HelpedPlayersToday", szResult); szPlayersT = strval(szResult); cache_get_field_content(i, "HW", szResult); warns = strval(szResult); userID = GetPlayerID( szName ); if(userID != INVALID_PLAYER_ID) format(szLastOn, 25, "Online (%d)", userID); y++; format(szDialog, sizeof(szDialog), "(%d) %s\t%s\t%d today / %d total\t%d/3\n", szAdmin, szName, szLastOn, szPlayersT, szPlayers, warns); strcat(szDialog2, szDialog); } cache_delete(result); format(szTitle, sizeof(szTitle), "{FFEE00}Helpers (%d/%d)", GetStaffOnline(1), y); } } ShowPlayerDialog(playerid, DIALOG_STAFF1, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog2, "Ok", "Back"); } case DIALOG_STAFF1: { if(!response) return ShowPlayerDialog(playerid, DIALOG_STAFF, DIALOG_STYLE_LIST, "Staff", "Admins\nHelpers", "Ok", "Close"); } Edited April 12, 2020 by IonutB
RoberTo Posted April 12, 2020 Posted April 12, 2020 IonutB bai frate, nu are cum sa te ajute nimeni ! Si de ce ... ? Pentru ca tu in primu rand folosesti un script ce MySQL corect ? Stii ce este ala MySQL ? Nu isi bate nimeni capul cu tine cu eroarea aceasta pentru ca nu ai indeajuns nivelul de asi bate capul cu tine. 1
IonutB Posted April 12, 2020 Author Posted April 12, 2020 19 minutes ago, RoberTo said: IonutB bai frate, nu are cum sa te ajute nimeni ! Si de ce ... ? Pentru ca tu in primu rand folosesti un script ce MySQL corect ? Stii ce este ala MySQL ? Nu isi bate nimeni capul cu tine cu eroarea aceasta pentru ca nu ai indeajuns nivelul de asi bate capul cu tine. Da, stiu sa folosesc un un script Mysql, da, stiu ce e ala mysql.
StrikerM Posted April 13, 2020 Posted April 13, 2020 Acum 11 ore, IonutB a spus: @StrikerM Scade din stringuri, fa-le 128, momentan avand 0 helperi si 0 admini vezi macar daca iti functioneaza asa. Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte. Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net. Aveti grija pe cine ajutati, majoritatea sunt caini.
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