diff --git a/gamemodes/irresistible/cnr/features/stocks/stocks.pwn b/gamemodes/irresistible/cnr/features/stocks/stocks.pwn index 75dea62..b2b8604 100644 --- a/gamemodes/irresistible/cnr/features/stocks/stocks.pwn +++ b/gamemodes/irresistible/cnr/features/stocks/stocks.pwn @@ -341,7 +341,7 @@ thread StockMarket_OnPurchaseOrder( playerid, stockid, Float: shares ) new sold_amount_minus_fee = floatround( sold_shares * ask_price - sold_amount_fee ); - if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) ) { + if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) && IsPlayerLoggedIn( sellerid ) ) { GivePlayerBankMoney( sellerid, sold_amount_minus_fee ), Beep( sellerid ); SendServerMessage( sellerid, "You have sold %s %s shares to %s(%d) for "COL_GOLD"%s"COL_WHITE" (plus %0.1f%s fee)!", number_format( sold_shares, .decimals = 2 ), g_stockMarketData[ stockid ] [ E_NAME ], ReturnPlayerName( playerid ), playerid, cash_format( sold_amount_minus_fee ), STOCK_MARKET_TRADING_FEE * 100.0, "%%" ); } else { diff --git a/gamemodes/irresistible/cnr/vip/player_market.pwn b/gamemodes/irresistible/cnr/vip/player_market.pwn index b726947..76263e4 100644 --- a/gamemodes/irresistible/cnr/vip/player_market.pwn +++ b/gamemodes/irresistible/cnr/vip/player_market.pwn @@ -251,7 +251,7 @@ thread PlayerMarket_OnPurchaseOrder( playerid, sellorderid, Float: purchase_amou new after_fee_amount = floatround( float( purchase_cost ) * 0.995, floatround_floor ); - if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) ) { + if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) && IsPlayerLoggedIn( sellerid ) ) { GivePlayerBankMoney( sellerid, after_fee_amount ), Beep( sellerid ); SendServerMessage( sellerid, "You have successfully sold %s IC to %s(%d) for "COL_GOLD"%s"COL_WHITE" (-0.5%s fee)!", number_format( purchase_amount, .decimals = 3 ), ReturnPlayerName( playerid ), playerid, cash_format( after_fee_amount ), "%%" ); } else {