From ea176e5928a65394b31ca9e95f08d4ee3ddac7ba Mon Sep 17 00:00:00 2001 From: Crova Date: Sat, 19 Jan 2019 15:19:37 +0100 Subject: [PATCH] Removes tax from weed sell/buy --- gamemodes/irresistible/cnr/features/weed.pwn | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/weed.pwn b/gamemodes/irresistible/cnr/features/weed.pwn index b2d6000..e70d08e 100644 --- a/gamemodes/irresistible/cnr/features/weed.pwn +++ b/gamemodes/irresistible/cnr/features/weed.pwn @@ -168,8 +168,6 @@ CMD:weed( playerid, params[ ] ) else if ( iCost < 0 || iCost > 100000 ) return SendError( playerid, "Price must be between 0 and 100000." ); else if ( GetDistanceBetweenPlayers( playerid, pID ) < 5.0 ) { - new iTaxed = floatround( iCost * 0.8 ); - if ( GetPlayerCash( pID ) < iCost ) return SendError( playerid, "This person doesn't have enough money." ); p_WeedDealer[ pID ] = playerid; @@ -178,7 +176,7 @@ CMD:weed( playerid, params[ ] ) p_WeedSellingPrice[ pID ] = iCost; p_SellingWeedTick[ playerid ] = g_iTime + 60; SendClientMessageFormatted( pID, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} %s(%d) is selling you %d gram(s) of weed for %s. "COL_ORANGE"/weed buy"COL_WHITE" to buy.", ReturnPlayerName( playerid ), playerid, iAmount, cash_format( iCost ) ); - SendClientMessageFormatted( playerid, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} You have sent an offer to %s(%d) to buy a %d gram(s) of weed for "COL_GOLD"%s.", ReturnPlayerName( pID ), pID, iAmount, cash_format( iTaxed ) ); + SendClientMessageFormatted( playerid, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} You have sent an offer to %s(%d) to buy a %d gram(s) of weed for "COL_GOLD"%s.", ReturnPlayerName( pID ), pID, iAmount, cash_format( iCost ) ); return 1; } else @@ -195,8 +193,7 @@ CMD:weed( playerid, params[ ] ) new dealerid = p_WeedDealer[ playerid ], iGrams = p_WeedSellingGrams[ playerid ], - iCost = p_WeedSellingPrice[ playerid ], - iTaxed = floatround( iCost * 0.8 ) + iCost = p_WeedSellingPrice[ playerid ] ; if ( GetPlayerCash( playerid ) < iCost ) return SendError( playerid, "You need %s to buy %d grams of weed.", cash_format( iCost ), iGrams ); @@ -211,9 +208,9 @@ CMD:weed( playerid, params[ ] ) p_WeedGrams[ dealerid ] -= iGrams; GivePlayerCash( playerid, -iCost ); - GivePlayerCash( dealerid, iTaxed ); + GivePlayerCash( dealerid, iCost ); - SendClientMessageFormatted( dealerid, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} %s(%d) has bought %d grams of weed off you for %s.", ReturnPlayerName( playerid ), playerid, iGrams, cash_format( iTaxed ) ); + SendClientMessageFormatted( dealerid, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} %s(%d) has bought %d grams of weed off you for %s.", ReturnPlayerName( playerid ), playerid, iGrams, cash_format( iCost ) ); SendClientMessageFormatted( playerid, -1, ""COL_ORANGE"[DRUG DEAL]{FFFFFF} You have bought %d grams of weed for %s.", iGrams, cash_format( iCost ) ); GivePlayerWantedLevel( dealerid, 6 );