raise max market cap on stocks

This commit is contained in:
Lorenc Pekaj 2018-11-11 12:29:41 +11:00
parent 50567719f1
commit 99f98a2101
5 changed files with 16 additions and 14 deletions

View File

@ -232,7 +232,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
}
GiveGangCash( gangid, -final_price );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, final_price, 0.05 );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, final_price, 0.01 );
printf( "[gang vehicle] %s(%d) bought %s for %s", ReturnPlayerName( playerid ), GetPlayerAccountID( playerid ), g_BuyableVehicleData[ data_id ] [ E_NAME ], g_gangData[ gangid ] [ E_NAME ] );
SendServerMessage( playerid, "You have bought an "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE"!", g_BuyableVehicleData[ data_id ] [ E_NAME ], cash_format( final_price ) );

View File

@ -174,7 +174,7 @@ hook OnServerTickSecond( )
if ( rivals_members ) {
ShowPlayerHelpDialog( playerid, 2500, "~b~Defend~w~ from %d enemy gang member%s!~n~~n~Earning potential is ~g~%s", rivals_members, rivals_members == 1 ? ( "" ) : ( "s" ), cash_format( potential_earnings ) );
} else {
ShowPlayerHelpDialog( playerid, 2500, "~g~%s~w~ is in control now %d seconds!~n~~n~Earning potential is ~g~%s", ReturnGangName( current_attacker ), g_gangHardpointCaptureTime[ current_attacker ], cash_format( potential_earnings ) );
ShowPlayerHelpDialog( playerid, 2500, "~g~%s~w~ is in control for %s!~n~~n~Earning potential is ~g~%s", ReturnGangName( current_attacker ), TimeConvert( g_gangHardpointCaptureTime[ current_attacker ] ), cash_format( potential_earnings ) );
}
}

View File

@ -84,15 +84,15 @@ hook OnScriptInit( )
// ID NAME SYMBOL MAX SHARES IPO_PRICE MAX_PRICE POOL_FACTOR PRICE_FACTOR DESCRIPTION
CreateStockMarket( E_STOCK_MINING_COMPANY, "The Mining Company", "MC", 100000.0, 25.0, 500.0, 100000.0, 10.0, "Exporting mined ores" );
CreateStockMarket( E_STOCK_AMMUNATION, "Ammu-Nation", "A", 100000.0, 25.0, 250.0, 100000.0, 10.0, "Purchases at Ammu-Nation/Weapon Dealers/Facilities" );
CreateStockMarket( E_STOCK_VEHICLE_DEALERSHIP, "Vehicle Dealership", "VD", 100000.0, 25.0, 750.0, 100000.0, 20.0, "Car jacker exports, vehicle and component sales" );
CreateStockMarket( E_STOCK_SUPA_SAVE, "Supa-Save", "SS", 100000.0, 25.0, 250.0, 100000.0, 10.0, "Purchases at Supa-Save and 24/7" );
CreateStockMarket( E_STOCK_TRUCKING_COMPANY, "The Trucking Company", "TC", 100000.0, 50.0, 250.0, 100000.0, 20.0, "Completed trucking missions" );
CreateStockMarket( E_STOCK_CLUCKIN_BELL, "Cluckin' Bell", "CB", 100000.0, 50.0, 250.0, 100000.0, 20.0, "Exporting meth bags" );
CreateStockMarket( E_STOCK_PAWN_STORE, "Pawn Store", "PS", 100000.0, 50.0, 250.0, 100000.0, 20.0, "Exported stolen furniture and toy sales" );
CreateStockMarket( E_STOCK_CASINO, "Casino", "CAS", 100000.0, 990.0, 5000.0, 100000.0, 150.0, "Money lost by players gambling" );
CreateStockMarket( E_STOCK_GOVERNMENT, "Government", "GOV", 100000.0, 750.0, 5000.0, 100000.0, 150.0, "Fireman and LEO activities" );
CreateStockMarket( E_STOCK_AVIATION, "Elitas Travel", "ET", 100000.0, 50.0, 250.0, 100000.0, 20.0, "Completed pilot missions and intercity travel" );
CreateStockMarket( E_STOCK_AMMUNATION, "Ammu-Nation", "A", 100000.0, 25.0, 500.0, 100000.0, 10.0, "Purchases at Ammu-Nation/Weapon Dealers/Facilities" );
CreateStockMarket( E_STOCK_VEHICLE_DEALERSHIP, "Vehicle Dealership", "VD", 100000.0, 25.0, 1000.0, 100000.0, 20.0, "Car jacker exports, vehicle and component sales" );
CreateStockMarket( E_STOCK_SUPA_SAVE, "Supa-Save", "SS", 100000.0, 25.0, 500.0, 100000.0, 10.0, "Purchases at Supa-Save and 24/7" );
CreateStockMarket( E_STOCK_TRUCKING_COMPANY, "The Trucking Company", "TC", 100000.0, 50.0, 500.0, 100000.0, 20.0, "Completed trucking missions" );
CreateStockMarket( E_STOCK_CLUCKIN_BELL, "Cluckin' Bell", "CB", 100000.0, 50.0, 500.0, 100000.0, 20.0, "Exporting meth bags" );
CreateStockMarket( E_STOCK_PAWN_STORE, "Pawn Store", "PS", 100000.0, 50.0, 500.0, 100000.0, 20.0, "Exported stolen furniture and toy sales" );
CreateStockMarket( E_STOCK_CASINO, "Casino", "CAS", 100000.0, 990.0, 7500.0, 100000.0, 150.0, "Money lost by players gambling" );
CreateStockMarket( E_STOCK_GOVERNMENT, "Government", "GOV", 100000.0, 750.0, 7500.0, 100000.0, 150.0, "Fireman and LEO activities" );
CreateStockMarket( E_STOCK_AVIATION, "Elitas Travel", "ET", 100000.0, 50.0, 500.0, 100000.0, 20.0, "Completed pilot missions and intercity travel" );
return 1;
}
@ -181,11 +181,13 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
format(
szLargeString, sizeof ( szLargeString ),
""COL_GREY"Stock Name\t%s\n"COL_GREY"Stock Symbol\t%s\n"COL_GREY"Current Price\t%s\n"COL_GREY"Max Shares\t%s\n"COL_GREY"Market Cap.\t%sM\n"COL_GREY"Affected By\t%s",
""COL_GREY"Stock Name\t%s\n"COL_GREY"Stock Symbol\t%s\n"COL_GREY"Current Price\t%s\n"COL_GREY"Max Shares\t%s\n"COL_GREY"Market Capitalization\t%sM\n"COL_GREY"Earnings (24H)\t%s\n"COL_GREY"Donations (24H)\t%s\n"COL_GREY"Affected By\t%s",
g_stockMarketData[ stockid ] [ E_NAME ], g_stockMarketData[ stockid ] [ E_SYMBOL ],
cash_format( g_stockMarketReportData[ stockid ] [ 1 ] [ E_PRICE ], .decimals = 2 ),
number_format( g_stockMarketData[ stockid ] [ E_MAX_SHARES ], .decimals = 0 ),
cash_format( market_cap, .decimals = 2 ),
cash_format( g_stockMarketReportData[ stockid ] [ 0 ] [ E_POOL ] - g_stockMarketReportData[ stockid ] [ 0 ] [ E_DONATIONS ], .decimals = 0 ),
cash_format( g_stockMarketReportData[ stockid ] [ 0 ] [ E_DONATIONS ], .decimals = 0 ),
g_stockMarketData[ stockid ] [ E_DESCRIPTION ]
);
ShowPlayerDialog( playerid, DIALOG_STOCK_MARKET_INFO, DIALOG_STYLE_TABLIST, ""COL_WHITE"Stock Market", szLargeString, "Close", "Back" );

View File

@ -360,7 +360,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
SetVehicleParamsEx( g_vehicleData[ playerid ] [ bID ] [ E_VEHICLE_ID ], VEHICLE_PARAMS_ON, lights, alarm, doors, bonnet, boot, objective );
PutPlayerInVehicle( playerid, g_vehicleData[ playerid ] [ bID ] [ E_VEHICLE_ID ], 0 );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, g_BuyableVehicleData[ data_id ] [ E_PRICE ], 0.05 );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, g_BuyableVehicleData[ data_id ] [ E_PRICE ], 0.01 );
SendServerMessage( playerid, "You have bought an "COL_GREY"%s"COL_WHITE" for "COL_GOLD"%s"COL_WHITE"!", g_BuyableVehicleData[ data_id ] [ E_NAME ], cash_format( g_BuyableVehicleData[ data_id ] [ E_PRICE ] ) );
ShowPlayerDialog( playerid, DIALOG_BOUGHT_VEH, DIALOG_STYLE_MSGBOX, "{FFFFFF}You've purchased a vehicle!", "{FFFFFF}Glad to see you've purchased a vehicle. Please ensure you read:\n\n* Vehicles are kept until you sell them or go two months inactive. This is not refundable.\n* Do not mispark your vehicle or it can be removed/impounded.\n* Check out /v for vehicle commands.\n* Find an acceptable place to park your new vehicle such as your house or a parking lot.", "Okay", "" );

View File

@ -405,7 +405,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
Float: X, Float: Y, Float: Z;
GivePlayerCash( playerid, -g_vehicleComponentsData[ i ] [ E_PRICE ] );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, g_vehicleComponentsData[ i ] [ E_PRICE ], 0.05 );
StockMarket_UpdateEarnings( E_STOCK_VEHICLE_DEALERSHIP, g_vehicleComponentsData[ i ] [ E_PRICE ], 0.025 );
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_CREATED ] [ slotid ] = true;
g_vehiclePimpData[ ownerid ] [ vehicleid ] [ E_DISABLED ] [ slotid ] = false;