30.05.2015, 09:11
Hello sa-mp.com is possible to make additional case in a dialog with an additional row in mysql?
I try something but don;t work,don't show the dialog
This is my command
This is LoadPlayerFines
I try something but don;t work,don't show the dialog
This is my command
Код:
LoadPlayerFines(playerid); new stringd[256],finelist[256]; for(new fine;fine<MAX_FINES;fine++) { format(finelist,sizeof(finelist),"Amenda #%d [{4747D1}$%d{FFFFFF}] pentru '%s'",FinesInfo[playerid][fId],FinesInfo[playerid][fPret],FinesInfo[playerid][fPentru]); } ShowPlayerDialog(playerid, 432,DIALOG_STYLE_LIST,"Fines", stringd, "Detalii", "Close"); return 1; }
Код:
stock LoadPlayerFines( playerid ) { if( IsPlayerConnected( playerid ) ) { new DataString[ 1536 ], Query[ 1536 ], sendername[256]; GetPlayerName(playerid, sendername, sizeof(sendername)); format( Query, sizeof( Query ), "SELECT * FROM `fines` WHERE `Posesor` = '%s'", sendername); if(mysql_query( Query )) { mysql_store_result(); } else { mysql_free_result(); SendClientMessage( playerid, COLOR_WHITE, "MYSQL ERROR LAV, feel free to report this bug by SS'ing it and send it to a dev." ); printf("Could not call loadaccountvariables query %d %d",playerid,PlayerInfo[playerid][pDatabaseID]); Kick(playerid); } printf(" SQL: %s",Query); for(new fine;fine<MAX_FINES;fine++) { mysql_fetch_field( "ID", DataString ); FinesInfo[ playerid ][ fId ] = strval( DataString ); mysql_fetch_field( "Politist", DataString ); strmid(FinesInfo[ playerid ][ fPolitist ], DataString, 0, strlen(DataString), 255); mysql_fetch_field( "Pret", DataString ); FinesInfo[ playerid ][ fPret ] = strval( DataString ); mysql_fetch_field( "Pentru", DataString ); strmid(FinesInfo[ playerid ][ fPentru ], DataString, 0, strlen(DataString), 255); } mysql_free_result(); } return 1; }