From e2e31f3dbbdc60656ad21fd1c197f445922c92b5 Mon Sep 17 00:00:00 2001 From: Lorenc Date: Mon, 19 Mar 2018 07:43:40 +1100 Subject: [PATCH] * fix some blackjack backtraces * hardcode new visage interior * replace syncobject with streamer_update --- gamemodes/sf-cnr.pwn | 10 ++--- .../features/visage/blackjack.inc | 3 ++ .../irresistible/features/visage/casino.inc | 43 +++++++++++++++++++ .../irresistible/features/visage/roulette.inc | 3 +- 4 files changed, 53 insertions(+), 6 deletions(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index c5fb6d9..4639f2b 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -15,7 +15,7 @@ #pragma compat 1 #pragma option -d3 #pragma dynamic 7200000 -// #define DEBUG_MODE +#define DEBUG_MODE /* ** SA-MP Includes ** */ #include < a_samp > @@ -34015,28 +34015,28 @@ thread OnSlotMachinesLoad( ) g_slotmachineData[ id ] [ E_TIMER ] = -1; // Create machines - CreateDynamicObject( 2325, X, Y, Z, 0.00000, 0.00000, rZ ); + CreateDynamicObject( 2325, X, Y, Z, 0.00000, 0.00000, rZ, .priority = 9999 ); // Third slot fOffsetX = 0.096 * floatsin( rZ + 96.0, degrees ); fOffsetY = 0.096 * floatcos( rZ + 96.0, degrees ); g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 0 ] = 20.0 * random( 18 ); - g_slotmachineData[ id ] [ E_SPIN ] [ 0 ] = CreateDynamicObject( 2347, X - fOffsetX, Y + fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 0 ], 0.00000, rZ ); + g_slotmachineData[ id ] [ E_SPIN ] [ 0 ] = CreateDynamicObject( 2347, X - fOffsetX, Y + fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 0 ], 0.00000, rZ, .priority = 9999 ); // Second slot fOffsetX = 0.025 * floatsin( rZ + 66.4, degrees ); fOffsetY = 0.025 * floatcos( rZ + 66.4, degrees ); g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 1 ] = 20.0 * random( 18 ); - g_slotmachineData[ id ] [ E_SPIN ] [ 1 ] = CreateDynamicObject( 2347, X + fOffsetX, Y - fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 1 ], 0.00000, rZ ); + g_slotmachineData[ id ] [ E_SPIN ] [ 1 ] = CreateDynamicObject( 2347, X + fOffsetX, Y - fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 1 ], 0.00000, rZ, .priority = 9999 ); // First slot fOffsetX = 0.140 * floatsin( rZ + 85.9, degrees ); fOffsetY = 0.140 * floatcos( rZ + 85.9, degrees ); g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 2 ] = 20.0 * random( 18 ); - g_slotmachineData[ id ] [ E_SPIN ] [ 2 ] = CreateDynamicObject( 2347, X + fOffsetX, Y - fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 2 ], 0.00000, rZ ); + g_slotmachineData[ id ] [ E_SPIN ] [ 2 ] = CreateDynamicObject( 2347, X + fOffsetX, Y - fOffsetY, Z + 0.0024, g_slotmachineData[ id ] [ E_SPIN_ROTATE ] [ 2 ], 0.00000, rZ, .priority = 9999 ); // Add to iteration Iter_Add(SlotMachines, id); diff --git a/pawno/include/irresistible/features/visage/blackjack.inc b/pawno/include/irresistible/features/visage/blackjack.inc index 8bae04c..577a380 100644 --- a/pawno/include/irresistible/features/visage/blackjack.inc +++ b/pawno/include/irresistible/features/visage/blackjack.inc @@ -620,6 +620,9 @@ stock CheckForBlackjack( tableid ) stock RemovePlayerFromBlackjack( playerid, reset_cam = 0 ) { + if ( ! ( 0 <= playerid < MAX_PLAYERS ) ) + return 0; + new blackjack_table = p_blackjackTable[ playerid ]; diff --git a/pawno/include/irresistible/features/visage/casino.inc b/pawno/include/irresistible/features/visage/casino.inc index 971c0fc..0556143 100644 --- a/pawno/include/irresistible/features/visage/casino.inc +++ b/pawno/include/irresistible/features/visage/casino.inc @@ -62,6 +62,49 @@ hook OnPlayerConnect( playerid ) // purpose: creates the interior itself static stock InitializeCasinoInterior( ) { + // Remake + tmpVariable = CreateDynamicObject( 14624, 2585.871093, 1609.286010, 1511.188964, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( tmpVariable, 15, 8396, "sphinx01", "luxorwall02_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 ); + SetDynamicObjectMaterial( tmpVariable, 3, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 12, 14627, "ab_optilite", "ab_optilite", 0 ); + SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 1, 8396, "sphinx01", "luxorledge02_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 11, 5392, "eastshops1_lae", "blueshop2_LAe", 0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2619.851074, 1570.769042, 1509.729980, 0.000000, 0.000000, -36.799999, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 2619.667968, 1636.426025, 1509.729980, 0.000000, 0.000000, -36.799999, -1, -1, -1 ), 0, 8396, "sphinx01", "luxorceiling01_128", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19741, 2600.346923, 1568.895019, 1509.534057, -90.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxormural01_256", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19741, 2606.597900, 1568.895019, 1509.534057, -90.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "luxormural01_256", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19355, 2603.465087, 1568.878051, 1509.042968, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 8396, "sphinx01", "slidingdoor01_128", -16 ); + tmpVariable = CreateDynamicObject( 14623, 2635.883056, 1677.000000, 1512.906005, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( tmpVariable, 0, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 1, 10412, "hotel1", "gold128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 3, 5392, "eastshops1_lae", "blueshop2_LAe", 0 ); + SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 5, 8396, "sphinx01", "luxorwall02_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 7, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 8, 5392, "eastshops1_lae", "blueshop2_LAe", 0 ); + SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 ); + SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "casinodoor1_128", 0 ); + tmpVariable = CreateDynamicObject( 14624, 2653.422119, 1597.921997, 1511.194946, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( tmpVariable, 15, 8396, "sphinx01", "luxorwall02_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 9, 11471, "des_wtownmain", "orange2", 0 ); + SetDynamicObjectMaterial( tmpVariable, 3, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 6, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 4, 8396, "sphinx01", "luxorceiling01_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 12, 14627, "ab_optilite", "ab_optilite", 0 ); + SetDynamicObjectMaterial( tmpVariable, 10, 8396, "sphinx01", "luxormural01_256", 0 ); + SetDynamicObjectMaterial( tmpVariable, 1, 8396, "sphinx01", "luxorledge02_128", 0 ); + SetDynamicObjectMaterial( tmpVariable, 11, 5392, "eastshops1_lae", "blueshop2_LAe", 0 ); + CreateDynamicObject( 19943, 2616.636962, 1632.371948, 1507.371948, 0.000000, 0.000000, -19.899999, -1, -1, -1 ); + CreateDynamicObject( 19943, 2622.750976, 1574.579956, 1507.371948, 0.000000, 0.000000, -19.899999, -1, -1, -1 ); + + + + // Main Visage Object CreateDynamicObject( 7584, 1947.38281, 1916.19531, 78.19531, 0.00000, 0.00000, 0.00000, 0, 0, -1, 500.0, .priority = 1 ); // visible to 500m in world & interior 0 diff --git a/pawno/include/irresistible/features/visage/roulette.inc b/pawno/include/irresistible/features/visage/roulette.inc index 59ab5ea..f1d366f 100644 --- a/pawno/include/irresistible/features/visage/roulette.inc +++ b/pawno/include/irresistible/features/visage/roulette.inc @@ -347,7 +347,8 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) } // sometimes it doesnt show up - SyncObject( playerid, 0.005, 0.005, 0.005 ); + // SyncObject( playerid, 0.005, 0.005, 0.005 ); + Streamer_Update( playerid ); ApplyAnimation( playerid, "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0, 1 ); } }