Increase dividends for casino and government by a bit

This commit is contained in:
Lorenc Pekaj 2018-11-07 12:15:30 +11:00
parent ea6dce5a41
commit c4542f41aa
5 changed files with 15 additions and 15 deletions

View File

@ -94,7 +94,7 @@ hook OnPlayerUpdateEx( playerid )
GivePlayerScore( playerid, 2 ); GivePlayerScore( playerid, 2 );
//GivePlayerExperience( playerid, E_FIREMAN ); //GivePlayerExperience( playerid, E_FIREMAN );
GivePlayerCash( playerid, FIRE_EXTINGUISH_PAYOUT ); GivePlayerCash( playerid, FIRE_EXTINGUISH_PAYOUT );
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, FIRE_EXTINGUISH_PAYOUT, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, FIRE_EXTINGUISH_PAYOUT, 0.15 );
HouseFire_Remove( i ); HouseFire_Remove( i );
} }
return 1; return 1;

View File

@ -403,7 +403,7 @@ function BeginBlackJackTurn( tableid )
bet_amount += g_blackjackData[ tableid ] [ E_PAYOUT ]; bet_amount += g_blackjackData[ tableid ] [ E_PAYOUT ];
GivePlayerCash( gamerid, -g_blackjackData[ tableid ] [ E_PAYOUT ] ); GivePlayerCash( gamerid, -g_blackjackData[ tableid ] [ E_PAYOUT ] );
StockMarket_UpdateEarnings( E_STOCK_CASINO, g_blackjackData[ tableid ] [ E_PAYOUT ], 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, g_blackjackData[ tableid ] [ E_PAYOUT ], 0.05 );
DrawPlayerBlackjackCard( tableid, player_index ); DrawPlayerBlackjackCard( tableid, player_index );
if ( cardid < 1 ) { // distribute first two cards to players if ( cardid < 1 ) { // distribute first two cards to players
g_blackjackData[ tableid ] [ E_DRAW_CARD_TIMER ] = SetTimerEx( "DrawPlayerBlackjackCard", BLACKJACK_DEALER_WAIT, false, "dd", tableid, player_index ); g_blackjackData[ tableid ] [ E_DRAW_CARD_TIMER ] = SetTimerEx( "DrawPlayerBlackjackCard", BLACKJACK_DEALER_WAIT, false, "dd", tableid, player_index );
@ -574,7 +574,7 @@ stock CheckForBlackjack( tableid )
GameTextForPlayer( playerid, sprintf( "~n~~n~~y~%s returned!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~y~%s returned!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
else if ( player_score == 21 ) { else if ( player_score == 21 ) {
g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN; g_blackjackPlayerState[ tableid ] [ player_index ] = BLACKJACK_STATE_WIN;
@ -587,7 +587,7 @@ stock CheckForBlackjack( tableid )
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
else if ( dealer_score == 21 ) { else if ( dealer_score == 21 ) {
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
@ -607,7 +607,7 @@ stock CheckForBlackjack( tableid )
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
else if ( player_score < dealer_score && dealer_score >= 17 ) { else if ( player_score < dealer_score && dealer_score >= 17 ) {
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
@ -621,7 +621,7 @@ stock CheckForBlackjack( tableid )
GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 ); GameTextForPlayer( playerid, sprintf( "~n~~n~~g~%s won!", cash_format( payout ) ), 4000, 3 );
GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 ); GivePlayerCasinoRewardsPoints( playerid, g_blackjackData[ tableid ] [ E_PAYOUT ], .house_edge = 1.5 );
GivePlayerCash( playerid, payout ); GivePlayerCash( playerid, payout );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -payout, 0.05 );
} }
// alert world // alert world

View File

@ -238,7 +238,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
// deduct money // deduct money
GivePlayerCash( playerid, -totalBet ); GivePlayerCash( playerid, -totalBet );
StockMarket_UpdateEarnings( E_STOCK_CASINO, totalBet, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, totalBet, 0.05 );
// lock the player in // lock the player in
p_rouletteBetLocked{ playerid } = true; p_rouletteBetLocked{ playerid } = true;
@ -679,7 +679,7 @@ public OnRouletteWheelStop( rouletteid, winner )
// bet unlocked and paid // bet unlocked and paid
GivePlayerCash( playerid, won ); GivePlayerCash( playerid, won );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -won, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -won, 0.05 );
p_rouletteBetLocked{ playerid } = false; p_rouletteBetLocked{ playerid } = false;
new new

View File

@ -297,7 +297,7 @@ public OnPlayerUseSlotMachine( playerid, slotid, first_combo, second_combo, thir
// give the cash // give the cash
GivePlayerCash( playerid, iNetWin ); GivePlayerCash( playerid, iNetWin );
StockMarket_UpdateEarnings( E_STOCK_CASINO, -iNetWin, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, -iNetWin, 0.05 );
PlayerPlaySound( playerid, 4201, 0.0, 0.0, 0.0 ); // Coin fall PlayerPlaySound( playerid, 4201, 0.0, 0.0, 0.0 ); // Coin fall
GameTextForPlayer( playerid, "~w~~h~winner!", 5000, 6 ); GameTextForPlayer( playerid, "~w~~h~winner!", 5000, 6 );
return 1; return 1;
@ -512,7 +512,7 @@ stock TriggerPlayerSlotMachine( playerid, machineid )
PlayerPlaySound( playerid, 4202, 0.0, 0.0, 0.0 ); PlayerPlaySound( playerid, 4202, 0.0, 0.0, 0.0 );
ApplyAnimation( playerid, "CASINO", "slot_plyr", 2.0, 0, 1, 1, 0, 0 ); ApplyAnimation( playerid, "CASINO", "slot_plyr", 2.0, 0, 1, 1, 0, 0 );
GivePlayerCash( playerid, -entryFee ); GivePlayerCash( playerid, -entryFee );
StockMarket_UpdateEarnings( E_STOCK_CASINO, entryFee, 0.025 ); StockMarket_UpdateEarnings( E_STOCK_CASINO, entryFee, 0.05 );
return 1; return 1;
} }
return 1; return 1;

View File

@ -2542,7 +2542,7 @@ public OnPlayerDeath( playerid, killerid, reason )
GivePlayerCash( killerid, cashEarned ); GivePlayerCash( killerid, cashEarned );
GivePlayerScore( killerid, 2 ); GivePlayerScore( killerid, 2 );
GivePlayerExperience( killerid, E_POLICE, 0.5 ); GivePlayerExperience( killerid, E_POLICE, 0.5 );
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, cashEarned, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, cashEarned, 0.1 );
if ( cashEarned > 20000 ) printf("[police kill] %s -> %s - %s", ReturnPlayerName( killerid ), ReturnPlayerName( playerid ), cash_format( cashEarned ) ); // 8hska7082bmahu if ( cashEarned > 20000 ) printf("[police kill] %s -> %s - %s", ReturnPlayerName( killerid ), ReturnPlayerName( playerid ), cash_format( cashEarned ) ); // 8hska7082bmahu
if ( p_WantedLevel[ playerid ] > 64 ) SendGlobalMessage( -1, ""COL_GOLD"[POLICE KILL]{FFFFFF} %s(%d) has %s %s(%d) who had a wanted level of %d!", ReturnPlayerName( killerid ), killerid, killedWords[ random( sizeof( killedWords ) ) ], ReturnPlayerName( playerid ), playerid, p_WantedLevel[ playerid ] ); if ( p_WantedLevel[ playerid ] > 64 ) SendGlobalMessage( -1, ""COL_GOLD"[POLICE KILL]{FFFFFF} %s(%d) has %s %s(%d) who had a wanted level of %d!", ReturnPlayerName( killerid ), killerid, killedWords[ random( sizeof( killedWords ) ) ], ReturnPlayerName( playerid ), playerid, p_WantedLevel[ playerid ] );
SendClientMessageFormatted( killerid, -1, ""COL_GOLD"[ACHIEVE]{FFFFFF} You have killed %s(%d) with a wanted level of %d; earning you "COL_GOLD"%s{FFFFFF} and 2 score!", ReturnPlayerName( playerid ), playerid, p_WantedLevel[ playerid ], cash_format( cashEarned ) ); SendClientMessageFormatted( killerid, -1, ""COL_GOLD"[ACHIEVE]{FFFFFF} You have killed %s(%d) with a wanted level of %d; earning you "COL_GOLD"%s{FFFFFF} and 2 score!", ReturnPlayerName( playerid ), playerid, p_WantedLevel[ playerid ], cash_format( cashEarned ) );
@ -5127,7 +5127,7 @@ CMD:acceptbail( playerid, params[ ] )
GivePlayerCash( playerid, -equa ); GivePlayerCash( playerid, -equa );
GivePlayerCash( p_BailOfferer[ playerid ], cashEarned ); GivePlayerCash( p_BailOfferer[ playerid ], cashEarned );
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, cashEarned, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, cashEarned, 0.1 );
SendClientMessageFormatted( p_BailOfferer[ playerid ], -1, ""COL_GREEN"[BAIL]"COL_WHITE" %s(%d) has paid bail. You have earned "COL_GOLD"%s"COL_WHITE" from his bail.", ReturnPlayerName( playerid ), playerid, cash_format( cashEarned ) ); SendClientMessageFormatted( p_BailOfferer[ playerid ], -1, ""COL_GREEN"[BAIL]"COL_WHITE" %s(%d) has paid bail. You have earned "COL_GOLD"%s"COL_WHITE" from his bail.", ReturnPlayerName( playerid ), playerid, cash_format( cashEarned ) );
p_BailOfferer[ playerid ] = INVALID_PLAYER_ID; p_BailOfferer[ playerid ] = INVALID_PLAYER_ID;
SendServerMessage( playerid, "You have paid for your bail. You are now free!" ); SendServerMessage( playerid, "You have paid for your bail. You are now free!" );
@ -9064,8 +9064,8 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] )
if ( IsPlayerInEvent( playerid ) ) if ( IsPlayerInEvent( playerid ) )
return SendError( playerid, "You cannot use this while you're in an event." ); return SendError( playerid, "You cannot use this while you're in an event." );
if ( p_VIPLevel[ playerid ] < VIP_BRONZE ) if ( p_VIPLevel[ playerid ] < VIP_REGULAR )
return SendError( playerid, "You must be a Bronze V.I.P to acquire this." ); return SendError( playerid, "You must be a Regular V.I.P to acquire this." );
if ( ! IsPlayerInRangeOfPoint( playerid, 5.0, -1966.1591, 852.7100, 1214.2678 ) && ! IsPlayerInRangeOfPoint( playerid, 5.0, -1944.1324, 830.0725, 1214.2678 ) && ! IsPlayerInRangeOfPoint( playerid, 5.0, 60.3115, 121.5226, 1017.4534 ) ) if ( ! IsPlayerInRangeOfPoint( playerid, 5.0, -1966.1591, 852.7100, 1214.2678 ) && ! IsPlayerInRangeOfPoint( playerid, 5.0, -1944.1324, 830.0725, 1214.2678 ) && ! IsPlayerInRangeOfPoint( playerid, 5.0, 60.3115, 121.5226, 1017.4534 ) )
return SendError( playerid, "You must be near a gun vending machine inside the V.I.P lounge to use this." ); return SendError( playerid, "You must be near a gun vending machine inside the V.I.P lounge to use this." );
@ -13382,7 +13382,7 @@ stock ArrestPlayer( victimid, playerid )
GivePlayerScore( playerid, 2 ); GivePlayerScore( playerid, 2 );
GivePlayerExperience( playerid, E_POLICE ); GivePlayerExperience( playerid, E_POLICE );
GivePlayerCash( playerid, totalCash ); GivePlayerCash( playerid, totalCash );
StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, totalCash, 0.05 ); StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, totalCash, 0.1 );
if ( totalCash > 20000 ) printf("[police arrest] %s -> %s - %s", ReturnPlayerName( playerid ), ReturnPlayerName( victimid ), cash_format( totalCash ) ); // 8hska7082bmahu if ( totalCash > 20000 ) printf("[police arrest] %s -> %s - %s", ReturnPlayerName( playerid ), ReturnPlayerName( victimid ), cash_format( totalCash ) ); // 8hska7082bmahu
SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[ACHIEVE]{FFFFFF} You have earned "COL_GOLD"%s{FFFFFF} dollars and 2 score for arresting %s(%d)!", cash_format( totalCash ), ReturnPlayerName( victimid ), victimid ); SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[ACHIEVE]{FFFFFF} You have earned "COL_GOLD"%s{FFFFFF} dollars and 2 score for arresting %s(%d)!", cash_format( totalCash ), ReturnPlayerName( victimid ), victimid );
GameTextForPlayer( victimid, "~r~Busted!", 4000, 0 ); GameTextForPlayer( victimid, "~r~Busted!", 4000, 0 );