give mining xp for mining the rock

This commit is contained in:
Lorenc Pekaj 2019-06-02 16:50:57 +10:00
parent 7a7aaabeee
commit aedabe2d6b

View File

@ -43,6 +43,7 @@ static stock
g_orePrices [ ] = { 675, 900, 600, 2750, 3000, 3500, 4000, 2200, 2300, 1200 },
g_oreMiningTime [ ] = { 2000, 2800, 1600, 6800, 7200, 7600, 8000, 6400, 6560, 4000 },
Float: g_oreMiningXp [ ] = { 0.5, 0.7, 0.4, 1.7, 1.8, 1.9, 2.0, 1.6, 1.64, 1.0 },
g_oreQuanities [ ] = { 8, 8, 8, 8, 5, 3, 3, 5, 5, 6 },
// Iterator
@ -191,7 +192,7 @@ hook OnProgressCompleted( playerid, progressid, params )
SendServerMessage( playerid, "Great you've mined an ore, now store it in a "COL_GREY"Dune"COL_WHITE"." );
}
//GivePlayerExperience( playerid, E_MINING );
GivePlayerExperience( playerid, E_ROLEPLAY, g_oreMiningXp[ g_miningData[ m ] [ E_ORE ] ] );
SetPVarInt( playerid, "carrying_ore", m );
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CARRY );
SetPlayerAttachedObject( playerid, 4, 2936, 5, 0.000000, 0.197999, 0.133999, 113.099983, -153.799987, 57.300003, 0.631000, 0.597000, 0.659999, g_miningData[ m ] [ E_ARGB ], g_miningData[ m ] [ E_ARGB ] );
@ -212,7 +213,7 @@ hook OnPlayerEnterDynamicCP( playerid, checkpointid )
new earned_money = floatround( float( g_orePrices[ g_miningData[ ore ] [ E_ORE ] ] ) * 0.5 );
GivePlayerExperience( playerid, E_ROLEPLAY, 0.5 );
GivePlayerExperience( playerid, E_ROLEPLAY, 0.2 );
GivePlayerCash( playerid, earned_money );
StockMarket_UpdateEarnings( E_STOCK_MINING_COMPANY, earned_money, 0.5 );
SendServerMessage( playerid, "You have crushed a "COL_GREY"%s"COL_WHITE" Ore and earned "COL_GOLD"%s"COL_WHITE".", getOreName( g_miningData[ ore ] [ E_ORE ] ), cash_format( earned_money ) );