Help me with the dialog which does not pop up.
#1

hiii people. i just want to ask for some help with this dialog.
PROBLEM: if player is online, the dialog works fine and pops up showing all the information, but if the player is offline,
the information dialog does not show up. i took all the information from DB with mysql and it has no errors, but the dialog does not show.. please help me!

Quote:

[14:37:52] CMySQLHandler::Query(SELECT `Job`, `JobLastLoginDay`, `TimeWorkingInJob`, `JobRank` FROM `ServerPlayers` WHERE `User` = 'Scott_Greenfield') - Successfully executed.

[14:37:52] >> mysql_store_result( Connection handle: 1 )

[14:37:52] CMySQLHandler::StoreResult() - Result was stored.

[14:37:52] >> mysql_num_rows( Connection handle: 1 )

[14:37:52] CMySQLHandler::NumRows() - Returned 1 row(s)

[14:37:52] >> mysql_fetch_row_format( Connection handle: 1 )

[14:37:52] CMySQLHandler::FetchRow() - Return: 5|14|49|1

Код:
case 0: 
{
       new giveplayerid = ReturnUserID(AccountInfo[playerid][SelectedString]);
       new string[600], Year, Month; getdate(Year, Month);
			            
       new WorkingJobID, JobLastLogin, RankInJob;
       new Float: WorkingInJobTime;


       if(giveplayerid != INVALID_PLAYER_ID)
       {
             WorkingJobID        = AccountInfo[giveplayerid][Job];
             JobLastLogin         = AccountInfo[giveplayerid][JobLastLoginDay];
             WorkingInJobTime  = float(AccountInfo[giveplayerid][TimeWorkingInJob]);
             RankInJob            = AccountInfo[giveplayerid][JobRank];
       }
       else
       {
            format(string, sizeof(string), "SELECT `Job`, `JobLastLoginDay`, `TimeWorkingInJob`, `JobRank` FROM           `ServerPlayers` WHERE `User` = '%s'", AccountInfo[playerid][SelectedString]);
	    mysql_query(string);
	    mysql_store_result();
							
	    if(mysql_num_rows())
	    {
		   sscanf(string, "p<|>ddfd", WorkingJobID, JobLastLogin, WorkingInJobTime, RankInJob);
		   mysql_fetch_row(string);
							
	    }
        }	
			            
	 format(string, sizeof(string), ""COL_WHI"All the information %s.\n\n"COL_YEL"Last time played : "COL_WHI"%d/%d/%d.\n"COL_YEL"Time spent : "COL_WHI"%.2f.\n"COL_YEL"Rank : "COL_WHI"%s.\n",
					PlayerName(giveplayerid), Year, Month, JobLastLogin, WorkingInJobTime / 60, AccountInfo[giveplayerid][JobRank]);

       ShowPlayerDialog(playerid, WorkerInfoDialog, DIALOG_STYLE_MSGBOX, "Information", string, "Exit", "");
}
Reply
#2

BUMP>
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)