From 7dc93e50235c048261477db8021c5de658e1c8ce Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Fri, 9 Nov 2018 18:50:58 +1100 Subject: [PATCH] fix reward point issue --- gamemodes/irresistible/cnr/features/player_items/shop.pwn | 1 - .../irresistible/cnr/features/visage/rewardspoints.pwn | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/player_items/shop.pwn b/gamemodes/irresistible/cnr/features/player_items/shop.pwn index fd6c60a..346ea04 100644 --- a/gamemodes/irresistible/cnr/features/player_items/shop.pwn +++ b/gamemodes/irresistible/cnr/features/player_items/shop.pwn @@ -16,7 +16,6 @@ enum E_SHOP_ITEMS SHOP_ITEM_GAS_TANK, SHOP_ITEM_CHASITY_BELT, SHOP_ITEM_SECURE_WALLET, - SHOP_ITEM_TIE, SHOP_ITEM_SCISSOR, SHOP_ITEM_ROPES, SHOP_ITEM_FOIL, diff --git a/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn b/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn index 8686ea9..a57802a 100644 --- a/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn +++ b/gamemodes/irresistible/cnr/features/visage/rewardspoints.pwn @@ -25,7 +25,6 @@ static stock { "Highroller Access", 200000.0 } }, E_SHOP_ITEMS: g_casinoRewardsShopItems[ ] = { - SHOP_ITEM_TIE, SHOP_ITEM_SCISSOR, SHOP_ITEM_ROPES, SHOP_ITEM_FOIL, @@ -51,12 +50,8 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { if ( IsPlayerJailed( playerid ) ) return SendError( playerid, "You cannot use this while you're in jail." ); - new - x = 0; - if ( listitem >= sizeof( g_casinoRewardsShopItems ) ) { - // printf("Listitem %d, sizeof %d\n", listitem, sizeof( g_casinoRewardsShopItems) ); new rewards_item = listitem - sizeof( g_casinoRewardsShopItems ); new Float: rewards_points = g_casinoRewardsItems[ rewards_item ] [ E_POINTS ]; @@ -87,7 +82,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) } else { - for ( new i = 0; i < sizeof ( g_shopItemData ); i ++ ) if ( IsCasinoRewardsShopItem( g_shopItemData[ i ] [ E_ID ] ) ) + for ( new i = 0, x = 0; i < sizeof ( g_shopItemData ); i ++ ) if ( IsCasinoRewardsShopItem( g_shopItemData[ i ] [ E_ID ] ) ) { if ( x == listitem ) {