Merged in bug-fixes (pull request #65)

tiny
This commit is contained in:
Steven Howard 2019-01-24 19:29:57 +00:00 committed by Lorenc Pekaj
commit 39f38b441a
2 changed files with 6 additions and 6 deletions

View File

@ -411,12 +411,12 @@ CMD:business( playerid, params[ ] )
new new
bool: has = false; bool: has = false;
szLargeString = ""COL_WHITE"Name\t"COL_WHITE"Production Time\t"COL_WHITE"Product\t"COL_WHITE"Bank\n"; szHugeString = ""COL_WHITE"Name\t"COL_WHITE"Production Time\t"COL_WHITE"Product\t"COL_WHITE"Bank\n";
foreach ( new businessid : business ) if ( IsBusinessAssociate( playerid, businessid ) ) foreach ( new businessid : business ) if ( IsBusinessAssociate( playerid, businessid ) )
{ {
format( szLargeString, sizeof( szLargeString ), "%s%s\t%s\t"COL_GOLD"%s\t"COL_GREEN"%s\n", format( szHugeString, sizeof( szHugeString ), "%s%s\t%s\t"COL_GOLD"%s\t"COL_GREEN"%s\n",
szLargeString, g_businessData[ businessid ] [ E_NAME ], szHugeString, g_businessData[ businessid ] [ E_NAME ],
g_businessData[ businessid ] [ E_PROD_TIMESTAMP ] ? ( secondstotime( g_businessData[ businessid ] [ E_PROD_TIMESTAMP ], ", ", 5 ) ) : ( ""COL_GREEN"Production Finished" ), g_businessData[ businessid ] [ E_PROD_TIMESTAMP ] ? ( secondstotime( g_businessData[ businessid ] [ E_PROD_TIMESTAMP ], ", ", 5 ) ) : ( ""COL_GREEN"Production Finished" ),
g_businessData[ businessid ] [ E_PRODUCT ] == 0 ? ( ""COL_RED"No Product" ) : ( cash_format( g_businessData[ businessid ] [ E_PRODUCT ] * GetProductPrice( businessid ) ) ), g_businessData[ businessid ] [ E_PRODUCT ] == 0 ? ( ""COL_RED"No Product" ) : ( cash_format( g_businessData[ businessid ] [ E_PRODUCT ] * GetProductPrice( businessid ) ) ),
cash_format( g_businessData[ businessid ][ E_BANK ] ) cash_format( g_businessData[ businessid ][ E_BANK ] )
@ -426,7 +426,7 @@ CMD:business( playerid, params[ ] )
if ( ! has ) { if ( ! has ) {
return SendError( playerid, "You cannot use this command since you don't own any businesses." ); return SendError( playerid, "You cannot use this command since you don't own any businesses." );
} else { } else {
return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, ""COL_WHITE"Business Production", szLargeString, "Close", "" ); return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, ""COL_WHITE"Business Production", szHugeString, "Close", "" );
} }
} }
else if ( strmatch( params, "spawn" )) else if ( strmatch( params, "spawn" ))

View File

@ -5711,13 +5711,13 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
case 1: case 1:
{ {
foreach ( new i : houses ) if ( strmatch( g_houseData[ i ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) { foreach ( new i : houses ) if ( strmatch( g_houseData[ i ] [ E_OWNER ], ReturnPlayerName( playerid ) ) ) {
format( szLargeString, sizeof( szLargeString ), "%s%s\n", szLargeString, g_houseData[ i ] [ E_HOUSE_NAME ] ), has = true; format( szHugeString, sizeof( szHugeString ), "%s%s\n", szHugeString, g_houseData[ i ] [ E_HOUSE_NAME ] ), has = true;
} }
if ( ! has ) if ( ! has )
return SendError( playerid, "You do not own any home." ), ShowPlayerSpawnMenu( playerid ); return SendError( playerid, "You do not own any home." ), ShowPlayerSpawnMenu( playerid );
return ShowPlayerDialog( playerid, DIALOG_HOUSES, DIALOG_STYLE_LIST, "{FFFFFF}Set Spawn Location", szLargeString, "Select", "Back" ); return ShowPlayerDialog( playerid, DIALOG_HOUSES, DIALOG_STYLE_LIST, "{FFFFFF}Set Spawn Location", szHugeString, "Select", "Back" );
} }
// businesses // businesses