From aedabe2d6b7675a6524f93bc059704b4fe05f3f0 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 2 Jun 2019 16:50:57 +1000 Subject: [PATCH] give mining xp for mining the rock --- gamemodes/irresistible/cnr/features/minijobs/mining.pwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/minijobs/mining.pwn b/gamemodes/irresistible/cnr/features/minijobs/mining.pwn index 14bdee6..b4b4dc5 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/mining.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/mining.pwn @@ -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 ) );