diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 94b0e43..370736a 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -13,9 +13,9 @@ */ #pragma compat 1 -#pragma option -d3 +// #pragma option -d3 #pragma dynamic 7200000 -// #define DEBUG_MODE +//#define DEBUG_MODE #if defined DEBUG_MODE #pragma option -d3 @@ -45,6 +45,7 @@ #include < merrandom > #include < sampac > #include < MathParser > +#include < md-sort > native WP_Hash ( buffer[ ], len, const str[ ] ); native IsValidVehicle ( vehicleid ); native gpci ( playerid, serial[ ], len ); @@ -107,7 +108,6 @@ native gpci ( playerid, serial[ ], len ); #define IsPlayerInEvent(%0) (GetPlayerVirtualWorld(playerid)==69) #define IsPlayerInPlayerGang(%0,%1) (p_Class[%0] == p_Class[%1] && p_Class[%0] == CLASS_CIVILIAN && p_GangID[%0] == p_GangID[%1] && p_GangID[%0] != INVALID_GANG_ID) #define INVALID_TIMER_ID (-1) -#define IsPlayerUnderCover(%0) ((p_AccountID[%0] == 577142 || p_AccountID[%0] == 536230 || p_AccountID[%0] == 668504) && p_PlayerLogged{%0}) // StefiTV852, Shepard23, JamesComey #define IsPlayerNpcEx(%0) (IsPlayerNPC(%0) || strmatch(p_PlayerIP[%0], "127.0.0.1")) #define GetBusinessSecurity(%0) (g_businessSecurityData[%0][E_LEVEL]) @@ -145,7 +145,7 @@ new bool: False = false; #define CreateBillboard(%0,%1,%2,%3,%4) SetDynamicObjectMaterialText(CreateDynamicObject(7246,%1,%2,%3,0,0,%4),0,(%0),120,"Arial",24,0,-1,-16777216,1) /* ** Configuration ** */ -#define FILE_BUILD "v11.11.30" +#define FILE_BUILD "v11.12.50" #define SERVER_NAME "San Fierro Cops And Robbers (0.3.7)" #define SERVER_WEBSITE "www.irresistiblegaming.com" #define SERVER_IP "192.169.82.202:7777" @@ -584,24 +584,24 @@ new { "Cattus Interior", H_DEFAULT_X, H_DEFAULT_Y, H_DEFAULT_Z, 2, 0, false, { 266.60010, 302.42820, 999.14840 }, { 271.44260, 306.64240, 999.15580 } }, { "Assum Interior", 243.71980, 304.963500, 999.14840, 1, 10000, false, { 249.61870, 300.89080, 999.14840 }, { 244.85410, 305.49680, 999.14840 } }, { "Fossor Interior", 2218.4036, -1076.2621, 1050.4844, 1, 15000, false, { 2202.6704, -1078.198, 1050.4844 }, { 2211.8030, -1074.362, 1050.4844 } }, - { "Angusto Interior", 260.98790, 1284.29470, 1080.2578, 4, 20000, false, { 253.80180, 1294.2167, 1080.2578 }, { 258.55260, 1288.3639, 1080.2578 } }, + //{ "Angusto Interior", 260.98790, 1284.29470, 1080.2578, 4, 20000, false, { 253.80180, 1294.2167, 1080.2578 }, { 258.55260, 1288.3639, 1080.2578 } }, { "Organum Interior", 309.37170, 311.674700, 1003.3047, 4, 25000, false, { 310.13720, 310.80550, 1003.3047 }, { 300.02930, 300.86170, 1003.5391 } }, - { "Bulbus Interior", -68.84510, 1351.19570, 1080.2109, 6, 25000, false, { -71.41990, 1366.0359, 1080.2185 }, { -64.59070, 1360.7052, 1080.2185 } }, - { "Vindemia Interior", 295.08510, 1472.25520, 1080.2578, 15, 25000, false, { 290.14430, 1488.8372, 1080.2578 }, { 294.96960, 1483.6603, 1080.2578 } }, + //{ "Bulbus Interior", -68.84510, 1351.19570, 1080.2109, 6, 25000, false, { -71.41990, 1366.0359, 1080.2185 }, { -64.59070, 1360.7052, 1080.2185 } }, + //{ "Vindemia Interior", 295.08510, 1472.25520, 1080.2578, 15, 25000, false, { 290.14430, 1488.8372, 1080.2578 }, { 294.96960, 1483.6603, 1080.2578 } }, { "Aurora Interior", -2170.344, 639.502500, 1052.3750, 1, 30000, false, { -2168.073, 646.40000, 1057.5938 }, { -2158.598, 638.13010, 1057.5861 } }, { "Fragor Interior", 318.58580, 1114.47920, 1083.8828, 5, 35000, false, { 326.31450, 1117.5468, 1083.8828 }, { 317.28550, 1122.6113, 1083.8828 } }, - { "Mundus Interior", 24.012500, 1340.15890, 1084.3750, 10, 40000, false, { 19.801100, 1340.7814, 1084.3750 }, { 34.253800, 1342.9272, 1084.3750 } }, + //{ "Mundus Interior", 24.012500, 1340.15890, 1084.3750, 10, 40000, false, { 19.801100, 1340.7814, 1084.3750 }, { 34.253800, 1342.9272, 1084.3750 } }, { "Artus Interior", 2237.5259, -1081.6458, 1049.0234, 2, 40000, false, { 2236.2290, -1081.065, 1049.0234 }, { 2244.2285, -1069.357, 1049.0234 } }, { "Caelum Interior", 2233.6931, -1115.2620, 1050.8828, 5, 40000, false, { 2235.1128, -1114.911, 1050.8828 }, { 2229.8982, -1105.175, 1050.8903 } }, { "Rotta Interior", 2495.9663, -1692.0857, 1014.7422, 3, 50000, false, { 2491.1794, -1694.953, 1014.7461 }, { 2497.4587, -1704.258, 1014.7422 } }, { "Ascensor Interior", 2317.8369, -1026.7662, 1050.2178, 9, 50000, false, { 2320.9111, -1025.776, 1050.2109 }, { 2319.0242, -1014.091, 1050.2109 } }, { "Colonel Interior", 2807.5693, -1174.7520, 1025.5703, 8, 60000, false, { 2812.0911, -1173.043, 1025.5703 }, { 2806.0210, -1165.486, 1025.5703 } }, - { "Godfather Interior", 140.28170, 1365.92150, 1083.8594, 5, 65000, false, { 135.53440, 1366.6400, 1083.8615 }, { 143.49590, 1375.7461, 1083.8668 } }, + //{ "Godfather Interior", 140.28170, 1365.92150, 1083.8594, 5, 65000, false, { 135.53440, 1366.6400, 1083.8615 }, { 143.49590, 1375.7461, 1083.8668 } }, { "Recens Interior", 2270.4192, -1210.5172, 1047.5625, 10, 70000, false, { 2248.2854, -1207.207, 1049.0234 }, { 2261.0574, -1213.011, 1049.0234 } }, { "Novus Interior", 2365.2341, -1135.5957, 1050.8826, 8, 72000, false, { 2375.3567, -1121.340, 1050.8750 }, { 2367.7095, -1130.863, 1050.8826 } }, { "Securuse Interior", 2324.3826, -1149.5442, 1050.7101, 12, 80000, false, { 2317.5684, -1136.016, 1054.3047 }, { 2333.1262, -1147.694, 1050.7031 } }, - { "Lorem Interior", 234.13900, 1063.72110, 1084.2123, 6, 82500, false, { 235.83530, 1070.2394, 1084.1903 }, { 226.63560, 1073.0388, 1086.2266 } }, - { "Domus Interior", 225.73480, 1021.44500, 1084.0177, 7, 120000, false, { 224.76680, 1022.3558, 1084.0150 }, { 241.65380, 1037.2081, 1084.0118 } }, + //{ "Lorem Interior", 234.13900, 1063.72110, 1084.2123, 6, 82500, false, { 235.83530, 1070.2394, 1084.1903 }, { 226.63560, 1073.0388, 1086.2266 } }, + //{ "Domus Interior", 225.73480, 1021.44500, 1084.0177, 7, 120000, false, { 224.76680, 1022.3558, 1084.0150 }, { 241.65380, 1037.2081, 1084.0118 } }, { "Madd Doggs Mansion", 1260.6455, -785.46530, 1091.9063, 5, 1337, true , { 1262.1033, -772.6712, 1091.9063 }, { 1282.7361, -783.5193, 1089.9375 } }, { "Butcher Interior", 964.93310, 2160.13210, 1011.0303, 1, 1337, true , { 933.67050, 2118.9556, 1012.8329 }, { 947.38930, 2163.8730, 1011.0234 } }, { "Bar Interior", 501.93780, -67.563000, 998.75780, 11, 1337, true , { 511.80380, -68.01930, 999.25000 }, { 490.78870, -78.92080, 998.75780 } }, @@ -1164,19 +1164,13 @@ new /* ** Gang System ** */ enum e_gang_data { - E_SQL_ID, - E_NAME[ 30 ], - E_LEADER, - E_COLOR, + E_SQL_ID, E_NAME[ 30 ], E_LEADER, + E_COLOR, E_SOFT_DELETE_TS, - E_BANK, - E_KILLS, - E_DEATHS, - E_SCORE, + E_BANK, E_KILLS, E_DEATHS, + E_SCORE, E_RESPECT, - E_COLEADER[ MAX_COLEADERS ], - bool: E_INVITE_ONLY, - E_JOIN_MSG[ 96 ] + E_COLEADER[ MAX_COLEADERS ], bool: E_INVITE_ONLY, E_JOIN_MSG[ 96 ] }; enum E_GANG_LEAVE_REASON @@ -1193,6 +1187,7 @@ new g_gangData [ MAX_GANGS ] [ e_gang_data ], + g_sortedGangData [ MAX_GANGS ] [ e_gang_data ], // used for sorting only p_GangID [ MAX_PLAYERS ], bool: p_gangInvited [ MAX_PLAYERS ] [ MAX_GANGS ], @@ -2136,7 +2131,9 @@ enum E_REWARDS_DATA new g_casinoRewardsItems[ ] [ E_REWARDS_DATA ] = { - { "Fireworks", 5000.0 }, + { "Fireworks", 2500.0 }, + { "10 Explosive Bullets", 5000.0 }, + { "No Tax For 1 Hour", 10000.0 }, { "Highroller Access", 200000.0 } }, g_casinoRewardsShopItems[ ] = { @@ -3062,7 +3059,7 @@ new p_AntiEmpSpam [ MAX_PLAYERS ], bool: p_inPaintBall [ MAX_PLAYERS char ], p_Scissors [ MAX_PLAYERS ], - bool: p_TaxTime [ MAX_PLAYERS char ], + p_TaxTime [ MAX_PLAYERS ], bool: p_GPSToggled [ MAX_PLAYERS char ], p_GPSTimer [ MAX_PLAYERS ] = { 0xFF, ... }, p_GPSLocation [ MAX_PLAYERS ], @@ -3149,7 +3146,7 @@ new p_SearchedCountTick [ MAX_PLAYERS ], p_SellingWeedTick [ MAX_PLAYERS ], p_AntiKidnapSpam [ MAX_PLAYERS ], - p_JoinTimestamp [ MAX_PLAYERS ], + //p_JoinTimestamp [ MAX_PLAYERS ], p_PasswordedHouse [ MAX_PLAYERS ], p_HouseWeaponAddSlot [ MAX_PLAYERS char ], Text3D: p_AdminLabel [ MAX_PLAYERS ] = { Text3D: INVALID_3DTEXT_ID, ... }, @@ -3231,6 +3228,7 @@ new p_VehicleBringCooldown [ MAX_PLAYERS ], p_BusinessSpawnLocation [ MAX_PLAYERS ] = { -1, ... }, p_Fireworks [ MAX_PLAYERS ], + p_ExplosiveBullets [ MAX_PLAYERS ], bool: p_AddedEmail [ MAX_PLAYERS char ] ; @@ -3320,7 +3318,7 @@ main() public OnGameModeInit() { - SetGameModeText( "Cops And Robbers/DM/Gangs" ); + SetGameModeText( "Cops And Robbers / DM / Gangs" ); SetServerRule( "hostname", SERVER_NAME ); SetServerRule( "language", "All (English)" ); UsePlayerPedAnims( ); @@ -3677,7 +3675,7 @@ public OnGameModeInit() CreateEntrance( "[ROOFTOP]", -2629.4785, 696.2841, 27.9394, -2697.6145, 689.0028, 66.0922, 0, 0, false, true ); // Faze's Rooftop*/ // Custom Interiors - CreateEntrance( "[SEWER]", -1990.7736, 1033.7378, 55.7266, 3638.4670, 5215.5024, 1203.3168, 1, 1, true, true, -1 ); // Milky + // CreateEntrance( "[SEWER]", -1990.7736, 1033.7378, 55.7266, 3638.4670, 5215.5024, 1203.3168, 1, 1, true, true, -1 ); // Milky CreateEntrance( "[BANK]", -1493.1296, 920.1409, 7.1875, -1444.2537, 831.0490, 985.7027, 0, g_bankvaultData[ CITY_SF ] [ E_WORLD ], true, false, 52 ); // San Fierro @@ -4928,8 +4926,6 @@ public OnServerUpdate( ) // Begin iterating all players foreach(new playerid : Player) { - if ( g_WorldClockSeconds >= 1437 ) p_TaxTime{ playerid } = true; // The reason it aint in if statement below is because people may skip it... - if ( IsPlayerSpawned( playerid ) && p_PlayerLogged{ playerid } ) { iVehicle = GetPlayerVehicleID( playerid ); @@ -5407,6 +5403,24 @@ public OnServerUpdate( ) else Streamer_SetIntData( STREAMER_TYPE_MAP_ICON, g_informedRobberies[ ir ] [ E_MAP_ICON ], E_STREAMER_COLOR, setAlpha( COLOR_YELLOW, g_informedRobberies[ ir ] [ E_ALPHA ] ) ); } + // Soft delete gang + foreach (new gangid : gangs) if ( g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] != 0 && g_iTime > g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] ) + { + new + members = GetOnlineGangMembers( gangid ); + + if ( members <= 0 ) + { + new + cur = gangid; + + printf("Removed Gang From Cache Gang Id %d Since No Ppl", g_gangData[ gangid ] [ E_SQL_ID ] ); + DestroyGang( gangid, .soft_delete = true, .iter_remove = false ); + Iter_SafeRemove( gangs, cur, gangid ); + } + else g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] = 0; + } + // Make civilians react foreach (new civilianid : CivilianNpc) { @@ -5516,7 +5530,7 @@ stock GetGangCapturedTurfs( gangid ) z, c; - for( z = 0; z < MAX_TURFS; z++ ) if ( g_gangTurfData[ z ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ z ] [ E_OWNER ] == gangid ) { + foreach ( z : turfs ) if ( g_gangTurfData[ z ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ z ] [ E_OWNER ] == gangid ) { c++; } return c; @@ -5562,8 +5576,9 @@ public ZoneTimer( ) new profit = 0; - for( new zoneid = 0; zoneid < MAX_TURFS; zoneid++ ) if ( g_gangTurfData[ zoneid ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ zoneid ] [ E_OWNER ] == g ) { + foreach( new zoneid : turfs ) if ( g_gangTurfData[ zoneid ] [ E_OWNER ] != INVALID_GANG_ID && g_gangTurfData[ zoneid ] [ E_OWNER ] == g ) { profit += Zone_GetProfitability( zoneid, online_members - afk_members ); + g_gangData[ g ] [ E_RESPECT ] ++; // pay the gang respect each 24 hours } g_gangData[ g ] [ E_BANK ] += profit; @@ -5597,7 +5612,7 @@ public ZoneTimer( ) new oCount = 0; - for( new z; z < MAX_TURFS; z++ ) + foreach( new z : turfs ) { if ( g_gangzoneAttacker[ z ] != INVALID_GANG_ID ) { @@ -5652,7 +5667,7 @@ public ZoneTimer( ) if ( in_area ) TextDrawSetString( g_ZoneOwnerTD[ d ], sprintf( "~r~~h~(TERRITORY)~n~~w~~h~%s", ReturnGangName( g_gangTurfData[ z ] [ E_OWNER ] ) ) ); - if ( IsPlayerSpawned( d ) && p_Class[ d ] == CLASS_CIVILIAN && p_GangID[ d ] == g_gangTurfData[ z ] [ E_OWNER ] && ! p_inPaintBall{ d } ) + if ( IsPlayerSpawned( d ) && ! IsPlayerAFK( d ) && p_Class[ d ] == CLASS_CIVILIAN && p_GangID[ d ] == g_gangTurfData[ z ] [ E_OWNER ] && ! p_inPaintBall{ d } ) { PlayerPlaySound( d, 36205, 0.0, 0.0, 0.0 ); GivePlayerScore( d, in_area ? 2 : 1, .multiplier = 0.5 ); @@ -5660,14 +5675,26 @@ public ZoneTimer( ) } } } + else if ( g_gangTurfData[ z ] [ E_OWNER ] != INVALID_GANG_ID && oCount > 0 ) { + foreach ( new i : Player ) if ( p_GangID[ i ] != INVALID_GANG_ID && IsPlayerInDynamicArea( i, g_gangTurfData[ z ] [ E_AREA ] ) ) { + // message the attacker that they gotta attack + if ( p_GangID[ i ] == g_gangzoneAttacker[ z ] ) { + ShowPlayerHelpDialog( i, 1500, "~r~Kill~w~ the %d gang member%s in the area!", oCount, oCount == 1 ? ( "" ) : ( "s" ) ); + } + // message the defender + else if ( p_GangID[ i ] == g_gangTurfData[ z ] [ E_OWNER ] ) { + ShowPlayerHelpDialog( i, 1500, "~b~Defend~w~ the area from the %d enemy gang member%s!", attacker_member_count, attacker_member_count == 1 ? ( "" ) : ( "s" ) ); + } + } + } } else { - if ( !g_gangzoneAttackTimeout[ z ] ) { + if ( ! g_gangzoneAttackTimeout[ z ] ) { g_gangzoneAttackTimeout[ z ] = g_iTime + 10; SendClientMessageToGang( g_gangzoneAttacker[ z ], g_gangData[ g_gangzoneAttacker[ z ] ] [ E_COLOR ], "[GANG]{FFFFFF} You have 10 seconds to get back in the area until the turf war is stopped!" ); } - else if ( g_iTime > g_gangzoneAttackTimeout[ z ] ) + else if ( g_iTime >= g_gangzoneAttackTimeout[ z ] ) { g_gangzoneAttackCount[ z ] = 0; g_gangzoneAttackTimeout[ z ] = 0; @@ -5820,7 +5847,7 @@ public OnPlayerRequestClass( playerid, classid ) // SetPlayerPos( playerid, -1971.1536, 129.4870, 27.6875 ); // SetPlayerFacingAngle( playerid, 90.0 ); - SetPlayerPos( playerid, 229.613998, 87.164001, 1005.039978 ); + SetPlayerPos( playerid, 229.613998, 87.164001, 1605.039978 ); SetPlayerFacingAngle( playerid, -90.000000 ); SetPlayerInterior( playerid, 0 ); SetPlayerVirtualWorld( playerid, 0 ); @@ -5829,8 +5856,8 @@ public OnPlayerRequestClass( playerid, classid ) if ( p_ClassSelection{ playerid } == false ) { - static const Float: START_POS[ 3 ] = { 243.5, 87.23, 1005.9 }; - static const Float: FINAL_POS[ 3 ] = { 231.9, 87.23, 1005.9 }; + static const Float: START_POS[ 3 ] = { 243.5, 87.23, 1605.9 }; + static const Float: FINAL_POS[ 3 ] = { 231.9, 87.23, 1605.9 }; InterpolateCameraPos( playerid, START_POS[ 0 ], START_POS[ 1 ], START_POS[ 2 ], FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], 17500, CAMERA_MOVE ); InterpolateCameraLookAt( playerid, FINAL_POS[ 0 ], FINAL_POS[ 1 ], FINAL_POS[ 2 ], FINAL_POS[ 0 ] - 0.4, FINAL_POS[ 1 ], FINAL_POS[ 2 ] - 0.05, 15000, CAMERA_MOVE ); @@ -6079,7 +6106,6 @@ public OnPlayerConnect( playerid ) } PreloadAnimationLibrary( playerid, "MISC" ); - p_JoinTimestamp[ playerid ] = g_iTime; return 1; } @@ -6106,7 +6132,11 @@ public OnLookupComplete( playerid, success ) SendDeathMessage( INVALID_PLAYER_ID, playerid, 200 ); if ( IsProxyEnabledForPlayer( playerid ) ) { - format( szNormalString, sizeof( szNormalString ), "%s(%d) has connected to the server! (%s)", ReturnPlayerName( playerid ), playerid, GetPlayerCountryName( playerid ) ); + if ( IsPlayerUnderCover( playerid ) ) { + format( szNormalString, sizeof( szNormalString ), "%s(%d) has connected to the server! (MX)", ReturnPlayerName( playerid ), playerid ); + } else { + format( szNormalString, sizeof( szNormalString ), "%s(%d) has connected to the server! (%s)", ReturnPlayerName( playerid ), playerid, GetPlayerCountryName( playerid ) ); + } } else { format( szNormalString, sizeof( szNormalString ), "%s(%d) has connected to the server!", ReturnPlayerName( playerid ), playerid ); } @@ -6382,6 +6412,7 @@ public OnPlayerDisconnect( playerid, reason ) p_OwnedBusinesses[ playerid ] = 0; g_LastExportModel[ playerid ] = 0; p_usingSlotMachine[ playerid ] = -1; + p_ExplosiveBullets[ playerid ] = 0; p_GangSplitProfits[ playerid ] = 0; p_IrresistibleCoins[ playerid ] = 0.0; p_QuitToAvoidTimestamp[ playerid ] = 0; @@ -6546,8 +6577,8 @@ public OnPlayerSpawn( playerid ) RemovePlayerAttachedObject( playerid, 1 ), SetPlayerAttachedObject( playerid, 1, 1210, 7, 0.302650, -0.002469, -0.193321, 296.124053, 270.396881, 8.941717, 1.000000, 1.000000, 1.000000 ); // Gang Zones - for( new i = 0; i < MAX_TURFS; i++ ) { - GangZoneShowForPlayer( playerid, g_gangTurfData[ i ] [ E_ID ], g_gangTurfData[ i ] [ E_COLOR ] ); + foreach( new zoneid : turfs ) { + GangZoneShowForPlayer( playerid, g_gangTurfData[ zoneid ] [ E_ID ], g_gangTurfData[ zoneid ] [ E_COLOR ] ); } // VIP Skin @@ -6817,6 +6848,8 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f return 0; } + static Float: X, Float: Y, Float: Z; + // Anti-Rapid Fire if ( !p_RapidFireTickCount[ playerid ] ) p_RapidFireTickCount[ playerid ] = GetTickCount( ); else @@ -6875,7 +6908,6 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f else if ( hittype == BULLET_HIT_TYPE_VEHICLE ) { new - Float: X, Float: Y, Float:Z, Float: Health, Float: Damage, iModel = GetVehicleModel( hitid ) ; @@ -6912,7 +6944,7 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f UpdateDynamic3DTextLabelText( g_secureTruckVehicleLabel[ i ], setAlpha( COLOR_RED, 0x90 ), "0%" ); if ( allSecurityOffsetsShot( ) ) { - g_secureTruckData[ E_LOOT ] = RandomEx( 12000, 15000 ); + g_secureTruckData[ E_LOOT ] = RandomEx( 20000, 30000 ); g_secureTruckData[ E_ROBBED ] = false; g_secureTruckData[ E_OPEN ] = true; g_secureTruckData[ E_BEING_ROBBED ] = false; @@ -6975,14 +7007,31 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float:fX, Float:f } } - else if ( hittype == BULLET_HIT_TYPE_NONE ) + // Explosive Bullets + CreateExplosiveBullet( playerid ); + return 1; +} + +stock CreateExplosiveBullet( playerid ) { + + if ( GetPVarInt( playerid, "explosive_rounds" ) == 1 && p_ExplosiveBullets[ playerid ] > 0 ) { - if ( IsPlayerLorenc( playerid ) ) { - if ( weaponid == 30 ) CreateExplosion( fX, fY, fZ, 12, 10.0 ); - else if ( weaponid == 34 ) CreateExplosion( fX, fY, fZ, 10, 10.0 ); + static Float: fromX, Float: fromY, Float: fromZ; + static Float: toX, Float: toY, Float: toZ; + + // Cool effect + if ( GetPlayerLastShotVectors( playerid, fromX, fromY, fromZ, toX, toY, toZ ) ) { + new objectid = CreateDynamicObject( 19296, fromX, fromY, fromZ, 0.0, 0.0, 0.0 ); + new milliseconds = MoveDynamicObject( objectid, toX, toY, toZ, 500.0 ); + SetTimerEx( "Timer_DestroyObject", milliseconds + 200, false, "d", objectid ); + Streamer_Update( playerid, STREAMER_TYPE_OBJECT ); + + // deduct + p_ExplosiveBullets[ playerid ] --; + CreateExplosion( toX, toY, toZ, 12, 10.0 ); + ShowPlayerHelpDialog( playerid, 1500, "You have only %d explosive bullets remaining.", p_ExplosiveBullets[ playerid ] ); } } - return 1; } public OnPlayerShootDynamicObject( playerid, weaponid, objectid, Float:x, Float:y, Float:z ) @@ -6992,6 +7041,9 @@ public OnPlayerShootDynamicObject( playerid, weaponid, objectid, Float:x, Float: modelid = Streamer_GetIntData( STREAMER_TYPE_OBJECT, objectid, E_STREAMER_MODEL_ID ) ; + // Explosive Bullets + CreateExplosiveBullet( playerid ); + switch( modelid ) { // C4 @@ -7354,7 +7406,7 @@ public OnPlayerDeath( playerid, killerid, reason ) } /* ** Tax And Medical Fees ** */ - if ( ( g_iTime - p_JoinTimestamp[ playerid ] ) > 120 ) // Player has been online for at least 2 minutes. + if ( GetPlayerTotalCash( playerid ) > 0 ) // Player has been online for at least 2 minutes. { new szTaxable[ 128 ], iMoney = p_inPaintBall{ playerid } == true ? 0 : ( GetPlayerTotalCash( playerid ) > 200000 ? 1500 : 100 ); @@ -7362,16 +7414,19 @@ public OnPlayerDeath( playerid, killerid, reason ) format( szTaxable, sizeof( szTaxable ), "~w~You have paid ~r~%s~w~ in medical fees", number_format( iMoney ) ); GivePlayerCash( playerid, -( iMoney ) ); - if ( p_TaxTime{ playerid } == true && p_inPaintBall{ playerid } != true ) + if ( p_Uptime[ playerid ] > p_TaxTime[ playerid ] && p_inPaintBall{ playerid } != true ) { new player_tax = getPlayerTax( playerid ); if ( player_tax > 0 ) { - p_TaxTime{ playerid } = false; GivePlayerCash( playerid, -player_tax ); + // save to database + p_TaxTime[ playerid ] = ( p_TaxTime[ playerid ] > p_Uptime[ playerid ] ? p_TaxTime[ playerid ] : p_Uptime[ playerid ] ) + 1800; + mysql_single_query( sprintf( "UPDATE `USERS` SET `TAX_TIME`=%d WHERE `ID`=%d", p_TaxTime[ playerid ], p_AccountID[ playerid ] ) ); + // only add >10K to event bank, lessen queries if ( player_tax > 10000 ) UpdateServerVariable( "eventbank", GetGVarInt( "eventbank" ) + floatround( float( player_tax ) * 0.10 ), 0.0, "", GLOBAL_VARTYPE_INT ); @@ -7440,8 +7495,11 @@ public OnPlayerDeath( playerid, killerid, reason ) new killerGangId = p_GangID[ killerid ]; - if ( killerGangId != INVALID_GANG_ID ) - SaveGangData( killerGangId ), g_gangData[ killerGangId ] [ E_KILLS ]++; + if ( killerGangId != INVALID_GANG_ID ) { + g_gangData[ killerGangId ] [ E_KILLS ] ++; + if ( killerGangId != p_GangID[ playerid ] ) g_gangData[ killerGangId ] [ E_RESPECT ] ++; + SaveGangData( killerGangId ); + } switch( p_Kills[ killerid ]++ ) { @@ -8402,7 +8460,7 @@ public OnPlayerProgressComplete( playerid, progressid, params ) DeleteGVar( "meth_chloride", vehicleid ); DeleteGVar( "meth_chef", vehicleid ); - SendServerMessage( playerid, "You've yielded a pound of the purest meth. Take your bags over to "COL_GREY"Cluckin' Bell"COL_WHITE" for exportation." ); + SendServerMessage( playerid, "You've yielded a pound of meth. Take your bags over to "COL_GREY"Cluckin' Bell"COL_WHITE" for exportation." ); } } #if ENABLED_SECURE_TRUCK == true @@ -8624,7 +8682,6 @@ public OnPlayerCommandReceived(playerid, cmdtext[]) return 1; } - CMD:changename( playerid, params[ ] ) { SendServerMessage( playerid, "You can change your name using "COL_GREY"/ic market"COL_WHITE" for 50 IC." ); // cmd_ic( playerid, "market" ); @@ -9061,6 +9118,7 @@ CMD:streaks( playerid, params[ ] ) { return displayStreaks( playerid ); } +CMD:notes( playerid, params[ ] ) return cmd_mynotes( playerid, params ); CMD:myvipnotes( playerid, params[ ] ) return cmd_mynotes( playerid, params ); CMD:vipnotes( playerid, params[ ] ) return cmd_mynotes( playerid, params ); CMD:mynotes( playerid, params[ ] ) @@ -10321,6 +10379,16 @@ CMD:burglar( playerid, params[ ] ) if ( IsPointToPoint( 150.0, g_houseData[ houseid ] [ E_EX ], g_houseData[ houseid ] [ E_EY ], g_houseData[ houseid ] [ E_EZ ], -2480.1426, 5.5302, 25.6172 ) ) return SendError( playerid, "This house is prohibited from burglarly features as it is too close to the Pawn Store." ); + new Float: playerZ, Float: furnitureZ; + GetPlayerPos( playerid, playerZ, playerZ, playerZ ); + GetDynamicObjectPos( objectid, furnitureZ, furnitureZ, furnitureZ ); + + // apply animation + if ( playerZ - furnitureZ <= 0.0 ) ApplyAnimation( playerid, "CARRY", "liftup105", 4.0, 0, 0, 0, 0, 0 ); + else if ( playerZ - furnitureZ <= 0.45 ) ApplyAnimation( playerid, "CARRY", "liftup05", 4.0, 0, 0, 0, 0, 0 ); + else ApplyAnimation( playerid, "CARRY", "liftup", 4.0, 0, 0, 0, 0, 0 ); + + // Alert SendServerMessage( playerid, "You have stolen a "COL_GREY"%s"COL_WHITE". Store it in a Boxville to transport the item.", g_houseFurniture[ furniture_id ] [ E_NAME ] ); SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CARRY ); SetPVarInt( playerid, "stolen_fid", furniture_id ); @@ -10343,10 +10411,12 @@ CMD:burglar( playerid, params[ ] ) format( szID, sizeof( szID ), "vburg_%d_%d", vehicleid, GetGVarInt( szSmallString ) ); SetGVarInt( szID, GetPVarInt( playerid, "stolen_fid" ) ); RemovePlayerAttachedObject( playerid, 3 ); + ClearAnimations( playerid ); SetPlayerSpecialAction( playerid, SPECIAL_ACTION_NONE ); + SetPlayerFacingAngle( playerid, Angle ); SendServerMessage( playerid, "You have placed a "COL_GREY"%s"COL_WHITE" in this Boxville. "COL_ORANGE"[%d/"#MAX_BURGLARY_SLOTS"]", g_houseFurniture[ GetPVarInt( playerid, "stolen_fid" ) ] [ E_NAME ], GetGVarInt( szSmallString ) ); DeletePVar( playerid, "stolen_fid" ); - ClearAnimations( playerid ); + ApplyAnimation( playerid, "CARRY", "putdwn105", 4.0, 0, 0, 0, 0, 0 ); } else SendUsage( playerid, "/burglar [CRACKPW/STEAL/STORE]" ); return 1; @@ -10365,7 +10435,12 @@ CMD:tax( playerid, params[ ] ) { new Float: tax_rate = 0.0; new tax_amount = getPlayerTax( playerid, tax_rate ); - SendServerMessage( playerid, "Your tax is "COL_GOLD"%s"COL_WHITE" at %0.2f%s per 24 minutes.", number_format( tax_amount ), tax_rate, "%%" ); + + if ( p_Uptime[ playerid ] > p_TaxTime[ playerid ] ) { + SendServerMessage( playerid, "Your tax is "COL_GOLD"%s"COL_WHITE" at %0.2f%s when you die.", number_format( tax_amount ), tax_rate, "%%" ); + } else { + SendServerMessage( playerid, "Your tax is "COL_GOLD"%s"COL_WHITE" at %0.2f%s in %s.", number_format( tax_amount ), tax_rate, "%%", secondstotime( p_TaxTime[ playerid ] - p_Uptime[ playerid ] ) ); + } return 1; } @@ -10661,19 +10736,29 @@ CMD:admins( playerid, params[ ] ) if ( GetPlayerScore( playerid ) < 500 && !IsPlayerUnderCover( playerid ) && p_AdminLevel[ playerid ] < 1 ) return SendError( playerid, "You need at least 500 score to view the online adminstrators." ); - new count = 0; - szLargeString = ""COL_WHITE"Player\t"COL_WHITE"Admin Level\n"; + new g_adminList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true; - foreach(new i : Player) - { - if ( p_AdminLevel[ i ] ) { - count++; - format( szLargeString, sizeof( szLargeString ), "%s%s%s(%d)\tLevel %d\n", szLargeString, IsPlayerAdminOnDuty( i ) ? ( COL_PINK ) : ( COL_GREY ), ReturnPlayerName( i ), i, p_AdminLevel[ i ] ); - } + // store cash and playerid + foreach ( new player : Player ) { + g_adminList[ player ] [ 0 ] = player; + g_adminList[ player ] [ 1 ] = p_AdminLevel[ player ]; + } + + // sort + SortDeepArray( g_adminList, 1, .order = SORT_DESC ); + + // message + szLargeString = ""COL_WHITE"Player\t"COL_WHITE"Admin Level\n"; + for ( new i = 0; i < MAX_PLAYERS; i ++ ) if ( IsPlayerConnected( g_adminList[ i ] [ 0 ] ) && g_adminList[ i ] [ 1 ] > 0 ) { + format( szLargeString, sizeof( szLargeString ), "%s%s%s(%d)\tLevel %d\n", szLargeString, IsPlayerAdminOnDuty( g_adminList[ i ] [ 0 ] ) ? ( COL_PINK ) : ( COL_GREY ), ReturnPlayerName( g_adminList[ i ] [ 0 ] ), g_adminList[ i ] [ 0 ], g_adminList[ i ] [ 1 ] ); + is_empty = false; + } + + if ( is_empty ) { + return SendError( playerid, "There are no administrators online." ); + } else { + return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Online Admins", szLargeString, "Close", "" ), 1; } - if ( count == 0 ) return SendServerMessage( playerid, "There are no administrators online." ); - ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Online Admins", szLargeString, "Okay", "" ); - return 1; } CMD:donate( playerid, params[ ] ) return cmd_vip( playerid, params ); @@ -12084,65 +12169,87 @@ CMD:changepw( playerid, params[ ] ) CMD:richlist( playerid, params[ ] ) { - SendClientMessage( playerid, COLOR_GOLD, ".: Richest Online Players :." ); - new - iArray[ 3 ] = { INVALID_PLAYER_ID, ... }, - Richest = 0, - iStep = 0 - ; - Richest = 0; - foreach(new i : Player) - { - //if ( p_AdminLevel[ i ] > 0 ) continue; - if ( GetPlayerCash( i ) > Richest && i != iArray[ 0 ] && i != iArray[ 1 ] && i != iArray[ 2 ] ) { - iArray[ iStep ] = i; - Richest = GetPlayerCash( i ); - } + new g_richList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true; + + // store cash and playerid + foreach ( new player : Player ) { + g_richList[ player ] [ 0 ] = player; + g_richList[ player ] [ 1 ] = GetPlayerTotalCash( player ); } - Richest = 0; - SendClientMessage( playerid, -1, ReturnPlayerName( iArray[ iStep ] ) ); - iStep ++; - foreach(new i : Player) - { - //if ( p_AdminLevel[ i ] > 0 ) continue; - if ( GetPlayerCash( i ) > Richest && i != iArray[ 0 ] && i != iArray[ 1 ] && i != iArray[ 2 ] ) { - iArray[ iStep ] = i; - Richest = GetPlayerCash( i ); - } + + // sort + SortDeepArray( g_richList, 1, .order = SORT_DESC ); + + // message + szLargeString = ""COL_WHITE"Player\t"COL_WHITE"Total Money\n"; + for ( new i = 0; i < MAX_PLAYERS; i ++ ) if ( IsPlayerConnected( g_richList[ i ] [ 0 ] ) && g_richList[ i ] [ 1 ] > 50000 ) { + format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\t"COL_GOLD"%s\n", szLargeString, ReturnPlayerName( g_richList[ i ] [ 0 ] ), g_richList[ i ] [ 0 ], number_format( g_richList[ i ] [ 1 ] ) ); + is_empty = false; } - Richest = 0; - SendClientMessage( playerid, -1, ReturnPlayerName( iArray[ iStep ] ) ); - iStep ++; - foreach(new i : Player) - { - //if ( p_AdminLevel[ i ] > 0 ) continue; - if ( GetPlayerCash( i ) > Richest && i != iArray[ 0 ] && i != iArray[ 1 ] && i != iArray[ 2 ] ) { - iArray[ iStep ] = i; - Richest = GetPlayerCash( i ); - } + + if ( is_empty ) { + return SendError( playerid, "There are no rich players to show." ); + } else { + return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Rich Players Online", szLargeString, "Close", "" ), 1; } - SendClientMessage( playerid, -1, ReturnPlayerName( iArray[ iStep ] ) ); - return 1; } +CMD:getwanted( playerid, params[ ] ) return cmd_mostwanted( playerid, params ); +CMD:mostwanted( playerid, params[ ] ) +{ + new g_wantedList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true; + + // store cash and playerid + foreach ( new player : Player ) { + g_wantedList[ player ] [ 0 ] = player; + g_wantedList[ player ] [ 1 ] = p_WantedLevel[ player ]; + } + + // sort + SortDeepArray( g_wantedList, 1, .order = SORT_DESC ); + + // message + szLargeString = ""COL_WHITE"Player\t"COL_WHITE"Wanted Level\n"; + for ( new i = 0; i < MAX_PLAYERS; i ++ ) if ( IsPlayerConnected( g_wantedList[ i ] [ 0 ] ) && g_wantedList[ i ] [ 1 ] > 0 ) { + format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\t"COL_GOLD"%d\n", szLargeString, ReturnPlayerName( g_wantedList[ i ] [ 0 ] ), g_wantedList[ i ] [ 0 ], g_wantedList[ i ] [ 1 ] ); + is_empty = false; + } + + if ( is_empty ) { + return SendError( playerid, "There are no wanted players to show." ); + } else { + return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Wanted Players Online", szLargeString, "Close", "" ), 1; + } +} + +CMD:contracts( playerid, params[ ] ) return cmd_hitlist( playerid, params ); CMD:hitlist( playerid, params[ ] ) { if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." ); - //if ( !JobEquals( playerid, JOB_HITMAN ) ) return SendError( playerid, "You have to be a hitman to use this command." ); - SendClientMessage( playerid, COLOR_GOLD, ".: List of all contracted People :." ); - new count = 0; - foreach(new i : Player) - { - if ( p_ContractedAmount[ i ] > 0 ) - { - format( szNormalString, sizeof( szNormalString ), "%s(%d) - "COL_GOLD"$%d", ReturnPlayerName( i ), i, p_ContractedAmount[ i ] ); - SendClientMessage( playerid, -1, szNormalString ); - count ++; - } + new g_contractList[ MAX_PLAYERS ] [ 2 ], bool: is_empty = true; + + // store cash and playerid + foreach ( new player : Player ) { + g_contractList[ player ] [ 0 ] = player; + g_contractList[ player ] [ 1 ] = p_ContractedAmount[ player ]; + } + + // sort + SortDeepArray( g_contractList, 1, .order = SORT_DESC ); + + // message + szLargeString = ""COL_WHITE"Player\t"COL_WHITE"Total Contract\n"; + for ( new i = 0; i < MAX_PLAYERS; i ++ ) if ( IsPlayerConnected( g_contractList[ i ] [ 0 ] ) && g_contractList[ i ] [ 1 ] > 0 ) { + format( szLargeString, sizeof( szLargeString ), "%s%s(%d)\t"COL_GOLD"%s\n", szLargeString, ReturnPlayerName( g_contractList[ i ] [ 0 ] ), g_contractList[ i ] [ 0 ], number_format( g_contractList[ i ] [ 1 ] ) ); + is_empty = false; + } + + if ( is_empty ) { + return SendError( playerid, "There are no contracted players to show." ); + } else { + return ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, "{FFFFFF}Contracted Players Online", szLargeString, "Close", "" ), 1; } - if ( count == 0 ) SendClientMessage( playerid, -1, "No-one" ); - return 1; } CMD:rules( playerid, params[ ] ) @@ -13932,22 +14039,6 @@ CMD:arrest( playerid, params[ ] ) return 1; } -CMD:getwanted( playerid, params[ ] ) -{ - new pID; - if ( p_Class[ playerid ] != CLASS_POLICE && !p_AdminLevel[ playerid ] ) return SendError( playerid, "This is restricted to police only." ); - else if ( sscanf( params, #sscanf_u, pID ) ) return SendUsage( playerid, "/getwanted [PLAYER_ID]" ); - else if ( !IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player is not connected." ); - else - { - if ( p_WantedLevel[ pID ] ) - SendServerMessage( playerid, "%s(%d)'s wanted level is %d. Be advised, suspect is armed and dangerous.", ReturnPlayerName( pID ), pID, p_WantedLevel[ pID ] ); - else - SendServerMessage( playerid, "%s(%d) is an innocent civilian.", ReturnPlayerName( pID ), pID ); - } - return 1; -} - CMD:cuff( playerid, params[ ] ) { new victimid; // = GetClosestPlayer( playerid ); @@ -14234,25 +14325,20 @@ CMD:rape( playerid, params[ ] ) if ( JobEquals( playerid, JOB_RAPIST ) ) { iRandom += 10; } // Adds more success to rapists. if ( iRandom < 75 || IsPlayerTied( victimid ) ) { - if ( JobEquals( playerid, JOB_RAPIST ) && p_AidsVaccine{ victimid } == false && !JobEquals( victimid, JOB_PROSTITUTE ) ) + if ( p_InfectedHIV{ playerid } || ( JobEquals( playerid, JOB_RAPIST ) && p_AidsVaccine{ victimid } == false && !JobEquals( victimid, JOB_PROSTITUTE ) ) ) { - infect_cunt: - { - SendClientMessageFormatted( victimid, -1, ""COL_RED"[RAPED]{FFFFFF} You have been raped and infected with "COL_RED"HIV{FFFFFF} by %s(%d)!", ReturnPlayerName( playerid ), playerid ); - SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RAPED]{FFFFFF} You have raped %s(%d) and infected them with "COL_RED"HIV{FFFFFF}!", ReturnPlayerName( victimid ), victimid ); - GivePlayerScore( playerid, 2 ); - GivePlayerWantedLevel( playerid, 5 ); - GetPlayerHealth( victimid, Health ); - SetPlayerHealth( victimid, ( Health - 25.0 ) ); + SendClientMessageFormatted( victimid, -1, ""COL_RED"[RAPED]{FFFFFF} You have been raped and infected with "COL_RED"HIV{FFFFFF} by %s(%d)!", ReturnPlayerName( playerid ), playerid ); + SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RAPED]{FFFFFF} You have raped %s(%d) and infected them with "COL_RED"HIV{FFFFFF}!", ReturnPlayerName( victimid ), victimid ); + GivePlayerScore( playerid, 2 ); + GivePlayerWantedLevel( playerid, 5 ); + GetPlayerHealth( victimid, Health ); + SetPlayerHealth( victimid, ( Health - 25.0 ) ); - p_InfectedHIV{ victimid } = true; - SetTimerEx( "RapeDamage", 5000, false, "d", victimid ); - } + p_InfectedHIV{ victimid } = true; + SetTimerEx( "RapeDamage", 5000, false, "d", victimid ); } else { - if ( p_InfectedHIV{ playerid } ) goto infect_cunt; - SendClientMessageFormatted( victimid, -1, ""COL_RED"[RAPED]{FFFFFF} You have been raped by %s(%d)!", ReturnPlayerName( playerid ), playerid ); SendClientMessageFormatted( playerid, -1, ""COL_GREEN"[RAPED]{FFFFFF} You have raped %s(%d)!", ReturnPlayerName( victimid ), victimid ); GivePlayerScore( playerid, 1 ); @@ -14400,7 +14486,7 @@ CMD:takeover( playerid, params[ ] ) if ( p_Class[ playerid ] != CLASS_CIVILIAN ) return SendError( playerid, "This is restricted to civilians only." ); - if ( GetPlayerInterior( playerid ) != 0 || IsPlayerInBank( playerid ) ) + if ( GetPlayerInterior( playerid ) != 0 && GetPlayerVirtualWorld( playerid ) != 0 ) return SendError( playerid, "You cannot do this inside interiors." ); new @@ -14412,9 +14498,9 @@ CMD:takeover( playerid, params[ ] ) g_inAir = 0 ; - for( new z; z < sizeof( g_gangzoneData ); z++ ) + foreach ( new z : turfs ) { - if ( IsPlayerInArea( playerid, g_gangzoneData[ z ] [ E_MIN_X ], g_gangzoneData[ z ] [ E_MAX_X ], g_gangzoneData[ z ] [ E_MIN_Y ], g_gangzoneData[ z ] [ E_MAX_Y ] ) ) + if ( IsPlayerInDynamicArea( playerid, g_gangTurfData[ z ] [ E_AREA ] ) ) { new gangid = p_GangID[ playerid ]; @@ -14497,12 +14583,16 @@ CMD:gangs( playerid, params[ ] ) if ( !Iter_Count(gangs) ) return SendError( playerid, "There are no gangs to list." ); - szHugeString = ""COL_WHITE"Gang\t"COL_WHITE"Score\n"; + // store current sort into gangs & sort by respect + g_sortedGangData = g_gangData; + SortDeepArray( g_sortedGangData, E_RESPECT, .order = SORT_DESC ); - foreach(new g : gangs) { - format( szHugeString, sizeof( szHugeString ), "%s{%06x}%s\t%d\n", szHugeString, g_gangData[ g ] [ E_COLOR ] >>> 8, g_gangData[ g ] [ E_NAME ], g_gangData[ g ] [ E_SCORE ] ); + // create dialog + szHugeString = ""COL_WHITE"Gang\t"COL_WHITE"Respect\n"; + + for ( new g = 0; g < sizeof( g_sortedGangData ); g ++ ) if ( g_sortedGangData[ g ] [ E_SQL_ID ] != 0 ) { + format( szHugeString, sizeof( szHugeString ), "%s{%06x}%s\t%d\n", szHugeString, g_sortedGangData[ g ] [ E_COLOR ] >>> 8, g_sortedGangData[ g ] [ E_NAME ], g_sortedGangData[ g ] [ E_RESPECT ] ); } - return ShowPlayerDialog( playerid, DIALOG_GANG_LIST, DIALOG_STYLE_TABLIST_HEADERS, "Gangs List", szHugeString, "Select", "Cancel" ); } @@ -14665,10 +14755,10 @@ CMD:gang( playerid, params[ ] ) else if ( p_GangID[ playerid ] != INVALID_GANG_ID ) return SendError( playerid, "You are already inside a gang." ); else { - p_GangID[ playerid ] = gID; + p_GangID[ playerid ] = gID; p_gangInvited[ playerid ] [ gID ] = false; if ( p_WantedLevel[ playerid ] < 1 ) SetPlayerColor( playerid, g_gangData[ gID ] [ E_COLOR ] ); - SaveGangData( p_GangID[ playerid ] ); + mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ gID ] [ E_SQL_ID ], p_AccountID[ playerid ] ) ); SendClientMessageToGang( gID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], "[GANG]{FFFFFF} %s(%d) has joined the gang.", ReturnPlayerName( playerid ), playerid ); } return 1; @@ -14694,6 +14784,7 @@ CMD:gang( playerid, params[ ] ) p_gangInvited[ pID ] [ p_GangID[ playerid ] ] = true; p_gangInviteTick[ pID ] = GetTickCount( ); + GameTextForPlayer( pID, sprintf( "~n~~y~~h~/gang join %d", p_GangID[ playerid ] ), 2000, 4 ); format( szNormalString, sizeof( szNormalString ), "[GANG]{FFFFFF} %s(%d) has invited you to join %s, to join type \"/gang join %d\"", ReturnPlayerName( playerid ), playerid, g_gangData[ p_GangID[ playerid ] ] [ E_NAME ], p_GangID[ playerid ] ); SendClientMessage( pID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], szNormalString ); format( szNormalString, sizeof( szNormalString ), "[GANG]{FFFFFF} You have invited %s(%d) to join your gang.", ReturnPlayerName( pID ), pID ); @@ -15778,7 +15869,7 @@ CMD:geolocate( playerid, params[ ] ) { if ( IsPlayerUnderCover( pID ) ) { - SendClientMessageFormatted( playerid, COLOR_PINK, "[ADMIN]"COL_WHITE" %s(%d) is from America (US) [%s]", ReturnPlayerName( pID ), pID, GetPlayerCountryName( pID ), GetPlayerCountryCode( pID ), ReturnPlayerIP( pID ) ); + SendClientMessageFormatted( playerid, COLOR_PINK, "[ADMIN]"COL_WHITE" %s(%d) is from Mexico (MX) [%s]", ReturnPlayerName( pID ), pID, ReturnPlayerIP( pID ) ); } else { @@ -17749,7 +17840,13 @@ CMD:weather( playerid, params[ ] ) } /* Level RCON */ -CMD:furnishhomes( playerid, params[ ] ) { +CMD:explosiverounds( playerid, params[ ] ) { + if ( ! IsPlayerAdmin( playerid ) ) return 0; + p_ExplosiveBullets[ playerid ] += 100; + ShowPlayerHelpDialog( playerid, 1500, "You have only %d explosive bullets remaining.", p_ExplosiveBullets[ playerid ] ); + return 1; +} +/*CMD:furnishhomes( playerid, params[ ] ) { if ( ! IsPlayerAdmin( playerid ) ) return 0; for ( new i = 0; i < MAX_HOUSES; i ++ ) if ( g_houseData[ i ] [ E_CREATED ] ) { new interior = GetInteriorType( i ); @@ -17766,7 +17863,7 @@ stock GetInteriorType( houseid ) { return i; } return -1; -} +}*/ CMD:updatepool( playerid, params[ ] ) { @@ -18966,7 +19063,7 @@ public OnPlayerDriveVehicle(playerid, vehicleid) for ( new x = 0; x < MAX_DROPS; x ++ ) { new - drop_off_index = randomExcept( sizeof( g_airBusinessExportData[ ] ), ignore_drop_ids, sizeof( ignore_drop_ids ) ), + drop_off_index = randomExcept( ignore_drop_ids, sizeof( ignore_drop_ids ) ), city = random( sizeof( g_airBusinessExportData ) ) ; @@ -20511,6 +20608,17 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) return 1; } + // Explosive Bullets + if ( p_ExplosiveBullets[ playerid ] > 0 && PRESSED( KEY_YES ) ) { + if ( GetPVarInt( playerid, "explosive_rounds" ) == 1 ) { + DeletePVar( playerid, "explosive_rounds" ); + ShowPlayerHelpDialog( playerid, 2000, "Explosive rounds ~r~disabled." ); + } else { + SetPVarInt( playerid, "explosive_rounds", 1 ); + ShowPlayerHelpDialog( playerid, 2000, "Explosive rounds ~r~enabled." ); + } + } + if ( IsPlayerInCasino( playerid ) ) { // Gambling Slots @@ -20684,7 +20792,7 @@ public OnPlayerKeyStateChange( playerid, newkeys, oldkeys ) // create temporary bag object tempObject = CreateDynamicObject( 18849, g_airBusinessExportData[ city ] [ drop_off_index ] [ 0 ], g_airBusinessExportData[ city ] [ drop_off_index ] [ 1 ], playerZ + 2.0, 0.0, 0.0, 0.0 ); moveSpeed = MoveDynamicObject( tempObject, g_airBusinessExportData[ city ] [ drop_off_index ] [ 0 ], g_airBusinessExportData[ city ] [ drop_off_index ] [ 1 ], g_airBusinessExportData[ city ] [ drop_off_index ] [ 2 ] + 7.0, 8.0 ); - SetTimerEx( "DestroyDrugObject", moveSpeed + 4000, false, "d", tempObject ); + SetTimerEx( "Timer_DestroyObject", moveSpeed + 4000, false, "d", tempObject ); // count drugs exported SellBusinessProduct( playerid, businessid, i ); @@ -21429,9 +21537,6 @@ thread OnPlayerLogin( playerid, password[ ] ) new iCash = cache_get_field_content_int( 0, "CASH", dbHandle ); new iFightStyle = cache_get_field_content_int( 0, "FIGHTSTYLE", dbHandle ); new iWanted = cache_get_field_content_int( 0, "WANTEDLVL", dbHandle ); - new iGang = cache_get_field_content_int( 0, "GANG_ID", dbHandle ); - - printf("[%s] Reading gang id %d", ReturnPlayerName( playerid ), iGang ); SetPlayerCash ( playerid, iCash ); SetPlayerScore ( playerid, iScore ); @@ -21493,7 +21598,9 @@ thread OnPlayerLogin( playerid, password[ ] ) p_CasinoRewardsPoints[ playerid ] = cache_get_field_content_float( 0, "CASINO_REWARDS", dbHandle ); p_IsCasinoHighRoller{ playerid } = !!cache_get_field_content_int( 0, "VISAGE_HIGHROLLER", dbHandle ); p_Fireworks[ playerid ] = cache_get_field_content_int( 0, "FIREWORKS", dbHandle ); + p_ExplosiveBullets[ playerid ] = cache_get_field_content_int( 0, "EXPLOSIVE_BULLETS", dbHandle ); p_AddedEmail{ playerid } = !!cache_get_field_content_int( 0, "USED_EMAIL", dbHandle ); + p_TaxTime[ playerid ] = cache_get_field_content_int( 0, "TAX_TIME", dbHandle ); if ( p_forcedAnticheat[ playerid ] > 0 && ! IsPlayerUsingSampAC( playerid ) ) { SendError( playerid, "You must install an anticheat to play the server. Visit "COL_GREY"www.samp-ac.com"COL_WHITE" to install the anticheat." ); @@ -21560,28 +21667,31 @@ thread OnPlayerLogin( playerid, password[ ] ) SendServerMessage( playerid, "You have " COL_GREEN "successfully" COL_WHITE " logged in!" ); // UNDERCOVER USERS - if ( IsPlayerUnderCover( playerid ) ) - { + if ( IsPlayerUnderCover( playerid ) ) { // all undercover are american ips - format( p_PlayerIP[ playerid ], 16, "104.131.%d.%d", random( 255 ), random( 255 ) ); + format( p_PlayerIP[ playerid ], 16, "187.237.240.%d", random( 255 ) ); } + // Search for valid gang + new gang_sql = cache_get_field_content_int( 0, "GANG_ID", dbHandle ); + new bool: foundGang = false; + // Reset gang id just incase p_GangID[ playerid ] = INVALID_GANG_ID; - // Gang create - new - bool: foundGang = false; - - foreach(new g : gangs) if( iGang != INVALID_GANG_ID && iGang == g_gangData[ g ] [ E_SQL_ID ] ) { - p_GangID[ playerid ] = g, foundGang = true; - break; + // Search all gangs for the SQL + printf("[%s] Reading gang id %d", ReturnPlayerName( playerid ), gang_sql ); + if ( gang_sql ) { + foreach (new g : gangs) if( gang_sql == g_gangData[ g ] [ E_SQL_ID ] ) { + p_GangID[ playerid ] = g, foundGang = true; + break; + } } - printf("[%s] Found gang ? %d , id %d, gangid %d", ReturnPlayerName( playerid ), foundGang ? 1 : 0, p_GangID[ playerid ], iGang ); + printf("[%s] Found gang ? %s , id %d, gangid %d", ReturnPlayerName( playerid ), foundGang ? ("YES") : ("NO"), p_GangID[ playerid ], gang_sql ); if ( ! foundGang ) { - format( szNormalString, sizeof( szNormalString ), "SELECT * FROM `GANGS` WHERE `ID`=%d LIMIT 0,1", iGang ); + format( szNormalString, sizeof( szNormalString ), "SELECT * FROM `GANGS` WHERE `ID`=%d LIMIT 0,1", gang_sql ); mysql_function_query( dbHandle, szNormalString, true, "OnGangLoad", "d", playerid ); } @@ -22595,11 +22705,11 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) new x = 0; - foreach(new g : gangs) + for ( new g = 0; g < sizeof( g_sortedGangData ); g ++ ) if ( g_sortedGangData[ g ] [ E_SQL_ID ] != 0 ) { if ( x == listitem ) { - SetPVarInt( playerid, "viewing_gangid", g ); + SetPVarInt( playerid, "viewing_gang_sql", g_sortedGangData[ g ] [ E_SQL_ID ] ); ShowPlayerDialog( playerid, DIALOG_GANG_LIST_OPTIONS, DIALOG_STYLE_LIST, "{FFFFFF}Gang Options", "View Statistics\nView Gang Members", "Select", "Back" ); break; } @@ -22611,8 +22721,16 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) if ( !response ) return cmd_gangs( playerid, "" ); - new - g = GetPVarInt( playerid, "viewing_gangid" ); + new gang_sql = GetPVarInt( playerid, "viewing_gang_sql" ); + new g; + + // search sql, just incase someone searchs the gangs and doesnt find what they want + foreach (g : gangs) if ( g_gangData[ g ] [ E_SQL_ID ] == gang_sql ) { + break; + } + + if ( ! ( 0 <= g < MAX_GANGS ) || ! Iter_Contains( gangs, g ) ) + return SendError( playerid, "Unable to discover gang information as it no longer is loaded, please try again. (0x7D)" ); switch( listitem ) { @@ -22747,7 +22865,17 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) switch ( rewards_item ) { case 0: GivePlayerFireworks( playerid, 1 ); // fireworks - case 1: // highroller + case 1: + { + p_ExplosiveBullets[ playerid ] += 10; + ShowPlayerHelpDialog( playerid, 3000, "Press ~r~~k~~CONVERSATION_YES~~w~ to activate explosive bullets." ); + } + case 2: // taxes + { + p_TaxTime[ playerid ] = ( p_TaxTime[ playerid ] > p_Uptime[ playerid ] ? p_TaxTime[ playerid ] : p_Uptime[ playerid ] ) + 3600; + mysql_single_query( sprintf( "UPDATE `USERS` SET `TAX_TIME`=%d WHERE `ID`=%d", p_TaxTime[ playerid ], p_AccountID[ playerid ] ) ); + } + case 3: // highroller { if ( p_IsCasinoHighRoller{ playerid } ) return SendError( playerid, "You are already considered a casino highroller." ); mysql_single_query( sprintf( "UPDATE `USERS` SET `VISAGE_HIGHROLLER`=1 WHERE `ID`=%d", p_AccountID[ playerid ] ) ); @@ -23793,7 +23921,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) new Float: fDrill = float( p_drillStrength[ playerid ] ) / float( MAX_DRILL_STRENGTH ) * 100.0; - format( szLargeString, 512, ""COL_GREY"Thermal Drill:{FFFFFF} %0.0f%%\n"\ + format( szLargeString, 700, ""COL_GREY"Thermal Drill:{FFFFFF} %0.0f%%\n"\ ""COL_GREY"Ropes:{FFFFFF} %d\n"\ ""COL_GREY"Metal Melters:{FFFFFF} %d\n"\ ""COL_GREY"Scissors:{FFFFFF} %d\n"\ @@ -23802,7 +23930,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) ""COL_GREY"Money Case:{FFFFFF} %s\n", fDrill, p_Ropes[ pID ], p_MetalMelter[ pID ], p_Scissors[ pID ], p_WeedGrams[ pID ], p_Methamphetamine{ pID }, p_MoneyBag{ pID } == true ? ( "Yes" ) : ( "No" ) ); - format( szLargeString, 512, "%s"COL_GREY"Aluminium Foil:{FFFFFF} %d\n"\ + format( szLargeString, 700, "%s"COL_GREY"Aluminium Foil:{FFFFFF} %d\n"\ ""COL_GREY"Secure Wallet:{FFFFFF} %s\n"\ ""COL_GREY"Bobby Pins:{FFFFFF} %d\n"\ ""COL_GREY"C4:{FFFFFF} %d\n"\ @@ -23813,7 +23941,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) szLargeString, p_AntiEMP[ pID ], p_SecureWallet{ pID } == true ? ( "Yes" ) : ( "No" ), p_BobbyPins[ pID ], p_C4Amount[ pID ], p_AidsVaccine{ pID } == true ? ("Yes") : ("No"), p_CausticSoda{ pID }, p_MuriaticAcid{ pID }, p_HydrogenChloride{ pID } ); - format( szLargeString, 512, "%s"COL_GREY"Fireworks:{FFFFFF} %d\n", szLargeString, p_Fireworks[ playerid ] ); + format( szLargeString, 700, "%s"COL_GREY"Fireworks:{FFFFFF} %d\n"COL_GREY"Explosive Bullets:{FFFFFF} %d\n", szLargeString, p_Fireworks[ playerid ], p_ExplosiveBullets[ playerid ] ); ShowPlayerDialog( playerid, DIALOG_STATS_REDIRECT, DIALOG_STYLE_MSGBOX, "{FFFFFF}Item Statistics", szLargeString, "Okay", "Back" ); } case 3: displayStreaks( pID, DIALOG_STATS_REDIRECT, "Back", playerid ); @@ -26968,15 +27096,6 @@ stock SavePlayerData( playerid, bool: logout = false ) if ( IsPlayerCuffed( playerid ) || IsPlayerTazed( playerid ) || IsPlayerTied( playerid ) || p_LeftCuffed{ playerid } || p_QuitToAvoidTimestamp[ playerid ] > g_iTime ) bQuitToAvoid = true; - new - gangid = -1; - - if ( logout ) - printf ("[%s][0] has the gang id of %d", ReturnPlayerName( playerid ), p_GangID[ playerid ] ); - - if ( 0 <= p_GangID[ playerid ] < MAX_GANGS && Iter_Contains( gangs, p_GangID[ playerid ] ) ) - gangid = g_gangData[ p_GangID[ playerid ] ] [ E_SQL_ID ]; - format( Query, sizeof( Query ), "UPDATE `USERS` SET `SCORE`=%d,`CASH`=%d,`ADMINLEVEL`=%d,`BANKMONEY`=%d,`OWNEDHOUSES`=%d,`KILLS`=%d,`DEATHS`=%d,`VIP_PACKAGE`=%d,`XP`=%d,`OWNEDCARS`=%d,`LASTLOGGED`=%d,`VIP_EXPIRE`=%d,`LAST_SKIN`=%d,`BURGLARIES`=%d,`UPTIME`=%d,`ARRESTS`=%d,`CITY`=%d,`METH`=%d,`SODA`=%d,`ACID`=%d,`GAS`=%d,", GetPlayerScore( playerid ), GetPlayerCash( playerid ), p_AdminLevel[ playerid ], p_BankMoney[ playerid ], p_OwnedHouses[ playerid ], p_Kills[ playerid ], @@ -26996,19 +27115,15 @@ stock SavePlayerData( playerid, bool: logout = false ) p_ContractedAmount[ playerid ], p_WeedGrams[ playerid ], logout ? ( bQuitToAvoid ? 1 : 0 ) : 0, p_drillStrength[ playerid ] ); - format( Query, sizeof( Query ), "%s`BLEW_JAILS`=%d,`BLEW_VAULT`=%d,`VEHICLES_JACKED`=%d,`METH_YIELDED`=%d,`LAST_IP`='%s',`VIP_JOB`=%d,`TRUCKED`=%d,`COINS`=%f,`GANG_ID`=%d,`HOUSE_ID`=%d,`RANK`=%f,`ONLINE`=%d,`HIT_SOUND`=%d,`EXTRA_SLOTS`=%d,`BUSINESS_ID`=%d WHERE `ID`=%d", + format( Query, sizeof( Query ), "%s`BLEW_JAILS`=%d,`BLEW_VAULT`=%d,`VEHICLES_JACKED`=%d,`METH_YIELDED`=%d,`LAST_IP`='%s',`VIP_JOB`=%d,`TRUCKED`=%d,`COINS`=%f,`EXPLOSIVE_BULLETS`=%d,`HOUSE_ID`=%d,`RANK`=%f,`ONLINE`=%d,`HIT_SOUND`=%d,`EXTRA_SLOTS`=%d,`BUSINESS_ID`=%d WHERE `ID`=%d", Query, p_JailsBlown[ playerid ], p_BankBlown[ playerid ], p_CarsJacked[ playerid ], p_MethYielded[ playerid ], mysql_escape( ReturnPlayerIP( playerid ) ), p_VIPJob{ playerid }, p_TruckedCargo[ playerid ], p_IrresistibleCoins[ playerid ], - gangid, p_HouseSpawnLocation[ playerid ], p_IrresistiblePoints[ playerid ], + p_ExplosiveBullets[ playerid ], p_HouseSpawnLocation[ playerid ], p_IrresistiblePoints[ playerid ], !logout, p_HitmarkerSound{ playerid }, p_ExtraAssetSlots{ playerid }, p_BusinessSpawnLocation[ playerid ], p_AccountID[ playerid ] ); - - if ( logout ) - printf ("[%s][1] Exited Server With Gang ID %d, save len %d", ReturnPlayerName( playerid ), gangid, strlen( Query ) ); - mysql_single_query( Query ); if ( logout ) @@ -29780,38 +29895,37 @@ stock TimeConvert( seconds ) return szTime; } -stock getRandomCreatedHouse( fire_mode = 0 ) +stock getRandomCreatedHouse( ) { - new - iRandom, count - ; - for( new i; i < MAX_HOUSES; i++ ) - { - if ( g_houseData[ i ] [ E_CREATED ] == true ) count ++; - } - redo_random_hcount: - iRandom = random( count ); - if ( !g_houseData[ iRandom ] [ E_CREATED ] ) goto redo_random_hcount; - if ( fire_mode ) - { - static - szCity[ MAX_ZONE_NAME ]; + static szCity[ MAX_ZONE_NAME ]; + new ignoredHomes[ MAX_HOUSES ] = { -1, ... }; - for( new h; h < sizeof( g_fireData ); h ++ ) { - if ( g_fireData[ h ] [ E_CREATED ] ) { - if ( g_fireData[ h ] [ E_HOUSE ] == iRandom ) { goto redo_random_hcount; } - } + // first find homes to ignore + for ( new i = 0; i < MAX_HOUSES; i ++ ) + { + // Avoid Hills / Avoid V.I.P or Clan Homes + if ( g_houseData[ i ] [ E_CREATED ] != true || g_houseData[ i ] [ E_EZ ] > 300.0 || g_houseData[ i ] [ E_COST ] < 500000 ) { + ignoredHomes[ i ] = i; + continue; } - // Avoid Hills - if ( g_houseData[ iRandom ] [ E_EZ ] > 300.0 ) goto redo_random_hcount; - if ( g_houseData[ iRandom ] [ E_COST ] < 500000 ) goto redo_random_hcount; + // check for house fire + if ( IsHouseOnFire( i ) ) { + ignoredHomes[ i ] = i; + continue; + } // San Fierro only - Get2DCity( szCity, g_houseData[ iRandom ] [ E_EX ], g_houseData[ iRandom ] [ E_EY ], g_houseData[ iRandom ] [ E_EZ ] ); - if ( !strmatch( szCity, "San Fierro" ) ) goto redo_random_hcount; + Get2DCity( szCity, g_houseData[ i ] [ E_EX ], g_houseData[ i ] [ E_EY ], g_houseData[ i ] [ E_EZ ] ); + if ( ! strmatch( szCity, "San Fierro" ) ) { + ignoredHomes[ i ] = i; + continue; + } } - return iRandom; + + new random_home = randomExcept( ignoredHomes, sizeof( ignoredHomes ) ); + // printf("Fire on %d", random_home); + return random_home; } stock SetPlayerFacePoint(playerid, Float: fX, Float: fY, Float: offset = 0.0) @@ -30051,7 +30165,7 @@ stock CreateGang( szName[ ], playerid ) for ( new i = 0; i < MAX_COLEADERS; i ++ ) g_gangData[ ID ] [ E_COLEADER ] [ i ] = 0; - p_GangID[ playerid ] = ID; + p_GangID[ playerid ] = ID; // set it anyway here just incase of cache taking a bit if ( p_WantedLevel[ playerid ] == 0 && p_AdminOnDuty{ playerid } == false ) SetPlayerColor( playerid, g_gangData[ ID ] [ E_COLOR ] ); @@ -30059,7 +30173,7 @@ stock CreateGang( szName[ ], playerid ) SendClientMessageToGang( ID, g_gangData[ p_GangID[ playerid ] ] [ E_COLOR ], "[GANG]{FFFFFF} You have created the gang: %s(%d)", szName, ID ); // Insert gang to db - mysql_function_query( dbHandle, sprintf( "INSERT INTO `GANGS`(`NAME`,`LEADER`,`COLOR`) VALUES ('%s', %d, %d)", g_gangData[ ID ] [ E_NAME ], p_AccountID[ playerid ], color ), true, "OnGangAdded", "d", ID ); + mysql_function_query( dbHandle, sprintf( "INSERT INTO `GANGS`(`NAME`,`LEADER`,`COLOR`) VALUES ('%s', %d, %d)", g_gangData[ ID ] [ E_NAME ], p_AccountID[ playerid ], color ), true, "OnGangAdded", "dd", playerid, ID ); // Insert into iterator Iter_Add(gangs, ID); @@ -30067,9 +30181,18 @@ stock CreateGang( szName[ ], playerid ) return ID; } -thread OnGangAdded( gangid ) +thread OnGangAdded( leaderid, gangid ) { + // set cache incrementing id g_gangData[ gangid ] [ E_SQL_ID ] = cache_insert_id( ); + + // ensure leader is connected + if ( IsPlayerConnected( leaderid ) ) { + p_GangID[ leaderid ] = gangid; + mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=%d WHERE `ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ], p_AccountID[ leaderid ] ) ); + } else { + printf("[GANG ERROR] Gang SQL %d missing leader id (slot %d)", g_gangData[ gangid ] [ E_SQL_ID ], gangid ); + } return 1; } @@ -30096,6 +30219,9 @@ thread OnGangLoad( playerid ) if ( id != -1 ) { + // Declare saved gang + Iter_Add( gangs, id ); + // Load data into variables cache_get_field_content( 0, "NAME", g_gangData[ id ] [ E_NAME ], dbHandle, 30 ); cache_get_field_content( 0, "JOIN_MSG", g_gangData[ id ] [ E_JOIN_MSG ], dbHandle, 96 ); @@ -30106,6 +30232,7 @@ thread OnGangLoad( playerid ) g_gangData[ id ] [ E_BANK ] = cache_get_field_content_int( 0, "BANK", dbHandle ); g_gangData[ id ] [ E_DEATHS ] = cache_get_field_content_int( 0, "DEATHS", dbHandle ); g_gangData[ id ] [ E_SCORE ] = cache_get_field_content_int( 0, "SCORE", dbHandle ); + g_gangData[ id ] [ E_RESPECT ] = cache_get_field_content_int( 0, "RESPECT", dbHandle ); g_gangData[ id ] [ E_INVITE_ONLY ] = !!cache_get_field_content_int( 0, "INVITE_ONLY", dbHandle ); // Set to '\0' instead of null @@ -30120,11 +30247,9 @@ thread OnGangLoad( playerid ) format( szNormalString, sizeof( szNormalString ), "SELECT `USER_ID` FROM `GANG_COLEADERS` WHERE `GANG_ID`=%d LIMIT 0,%d", g_gangData[ id ] [ E_SQL_ID ], MAX_COLEADERS ); mysql_function_query( dbHandle, szNormalString, true, "OnGangColeaderLoad", "d", id ); - // Declare saved gang - Iter_Add(gangs, id); - // Message player InformGangConnectMessage( playerid, id ); + printf("[%s] Added gangid %d as gang slot %d", ReturnPlayerName( playerid ), gang_sql_id, id ); } else { SendServerMessage( playerid, "Had an issue loading your gang. Contact Lorenc (0x92F)." ); @@ -30162,15 +30287,18 @@ stock InformGangConnectMessage( playerid, gangid ) return 1; } -stock DestroyGang( gangid ) +stock DestroyGang( gangid, bool: soft_delete = false, bool: iter_remove = true ) { if ( !Iter_Contains( gangs, gangid ) ) return; - // Do SQL operations - mysql_single_query( sprintf( "DELETE FROM `GANGS` WHERE `ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); - mysql_single_query( sprintf( "DELETE FROM `GANG_COLEADERS` WHERE `ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); - mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE `GANG_ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); + if ( ! soft_delete ) + { + // Do SQL operations + mysql_single_query( sprintf( "DELETE FROM `GANGS` WHERE `ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); + mysql_single_query( sprintf( "DELETE FROM `GANG_COLEADERS` WHERE `ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); + mysql_single_query( sprintf( "UPDATE `USERS` SET `GANG_ID`=-1 WHERE `GANG_ID`=%d", g_gangData[ gangid ] [ E_SQL_ID ] ) ); + } // Disconnect current users foreach(new i : Player) if ( p_GangID[ i ] == gangid ) { @@ -30180,9 +30308,11 @@ stock DestroyGang( gangid ) // Reset gang data g_gangData[ gangid ] [ E_SQL_ID ] = 0; g_gangData[ gangid ] [ E_LEADER ] = 0; + g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] = 0; g_gangData[ gangid ] [ E_COLOR ] = COLOR_GANGZONE; g_gangData[ gangid ] [ E_NAME ] [ 0 ] = '\0'; g_gangData[ gangid ] [ E_BANK ] = 0; + g_gangData[ gangid ] [ E_RESPECT ] = 0; g_gangData[ gangid ] [ E_INVITE_ONLY ] = false; g_gangData[ gangid ] [ E_JOIN_MSG ] [ 0 ] = '\0'; @@ -30191,10 +30321,12 @@ stock DestroyGang( gangid ) g_gangData[ gangid ] [ E_COLEADER ] [ i ] = 0; // Free iterator id - Iter_Remove( gangs, gangid ); + if ( iter_remove ) { + Iter_Remove( gangs, gangid ); + } // Empty out the turfs - for( new z = 0; z < MAX_TURFS; z++ ) + foreach ( new z : turfs ) { if ( g_gangTurfData[ z ] [ E_OWNER ] == gangid ) { @@ -30210,10 +30342,10 @@ stock SaveGangData( gangid ) if ( gangid == INVALID_GANG_ID ) return; - format( szBigString, sizeof( szBigString ), "UPDATE `GANGS` SET `NAME`='%s',`LEADER`=%d,`COLOR`=%d,`KILLS`=%d,`DEATHS`=%d,`SCORE`=%d,`BANK`=%d WHERE `ID`=%d", - mysql_escape( g_gangData[ gangid ] [ E_NAME ] ), g_gangData[ gangid ] [ E_LEADER ], g_gangData[ gangid ] [ E_COLOR ], g_gangData[ gangid ] [ E_KILLS ], g_gangData[ gangid ] [ E_DEATHS ], g_gangData[ gangid ] [ E_SCORE ], g_gangData[ gangid ] [ E_BANK ], g_gangData[ gangid ] [ E_SQL_ID ] ); + mysql_format( dbHandle, szLargeString, sizeof( szLargeString ), "UPDATE `GANGS` SET `NAME`='%e',`LEADER`=%d,`COLOR`=%d,`KILLS`=%d,`DEATHS`=%d,`SCORE`=%d,`BANK`=%d,`RESPECT`=%d WHERE `ID`=%d", + g_gangData[ gangid ] [ E_NAME ], g_gangData[ gangid ] [ E_LEADER ], g_gangData[ gangid ] [ E_COLOR ], g_gangData[ gangid ] [ E_KILLS ], g_gangData[ gangid ] [ E_DEATHS ], g_gangData[ gangid ] [ E_SCORE ], g_gangData[ gangid ] [ E_BANK ], g_gangData[ gangid ] [ E_RESPECT ], g_gangData[ gangid ] [ E_SQL_ID ] ); - mysql_single_query( szBigString ); + mysql_single_query( szLargeString ); } stock IsPlayerGangLeader( playerid, gangid, only_leader = 0 ) { @@ -30236,37 +30368,21 @@ stock DisconnectFromGang( playerid ) new gangid = p_GangID[ playerid ]; - p_GangID[ playerid ] = INVALID_GANG_ID; - if ( gangid == INVALID_GANG_ID ) return 0; + p_GangID[ playerid ] = INVALID_GANG_ID; + if ( ! Iter_Contains( gangs, gangid ) ) return 0; - // if ( !g_gangData[ gangid ] [ E_SAVED ] ) - // return RemovePlayerFromGang( playerid, GANG_LEAVE_QUIT ); new - members = GetOnlineGangMembers( gangid, playerid ); + members = GetOnlineGangMembers( gangid ); printf("Gang id %d has currently %d members online", g_gangData[ gangid ] [ E_SQL_ID ], members ); - if ( members <= 0 ) - { - // print - printf("Removed Gang From Cache Gang Id %d Since No Ppl", g_gangData[ gangid ] [ E_SQL_ID ] ); - // Free iterator id - Iter_Remove( gangs, gangid ); - - // Empty out the turfs - for( new z = 0; z < MAX_TURFS; z++ ) - { - if ( g_gangTurfData[ z ] [ E_OWNER ] == gangid ) - { - g_gangTurfData[ z ] [ E_COLOR ] = COLOR_GANGZONE; - g_gangTurfData[ z ] [ E_OWNER ] = INVALID_GANG_ID; - GangZoneShowForAll( g_gangTurfData[ z ] [ E_ID ], COLOR_GANGZONE ); - } - } + if ( members <= 0 ) { + g_gangData[ gangid ] [ E_SOFT_DELETE_TS ] = g_iTime + 60; + printf("[GANG DEBUG] Begin soft delete Id %d Since No Ppl", g_gangData[ gangid ] [ E_SQL_ID ] ); } return 1; } @@ -30298,7 +30414,6 @@ stock RemovePlayerFromGang( playerid, E_GANG_LEAVE_REASON: reason = GANG_LEAVE_U { g_gangData[ gangid ] [ E_LEADER ] = g_gangData[ gangid ] [ E_COLEADER ] [ selected_coleader ]; g_gangData[ gangid ] [ E_COLEADER ] [ selected_coleader ] = 0; - SendClientMessageToGang( gangid, g_gangData[ gangid ] [ E_COLOR ], "[GANG]{FFFFFF} The co-leader of the gang has been selected as the gang leader (acc id %d).", selected_coleader ); } else @@ -30414,9 +30529,9 @@ stock gangNameExists( szName[ ] ) stock SetGangColorsToGang( gangid ) { - foreach(new i : Player) + foreach ( new i : Player ) { - for( new x = 0; x < MAX_TURFS; x++ ) + foreach ( new x : turfs ) { // reset color if ( g_gangTurfData[ x ] [ E_OWNER ] == gangid ) g_gangTurfData[ x ] [ E_COLOR ] = setAlpha( g_gangData[ g_gangzoneAttacker[ x ] ] [ E_COLOR ], 0x80 ); @@ -30741,13 +30856,17 @@ stock CreateFire( ) { for( new i, house; i < sizeof( g_fireData ); i ++ ) { - house = getRandomCreatedHouse( 1 ); - g_fireData[ i ] [ E_HEALTH ] = 100.0 + fRandomEx( 1, 25 ); - g_fireData[ i ] [ E_HOUSE ] = house; - g_fireData[ i ] [ E_CREATED ] = true; - format( string, sizeof( string ), "%0.1f", g_fireData[ i ] [ E_HEALTH ] ); - g_fireData[ i ] [ E_LABEL ] = CreateDynamic3DTextLabel( string, COLOR_YELLOW, g_houseData[ house ] [ E_EX ], g_houseData[ house ] [ E_EY ], g_houseData[ house ] [ E_EZ ] + 0.5, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1 ); - g_fireData[ i ] [ E_OBJECT ] = CreateDynamicObject( 18691, g_houseData[ house ] [ E_EX ], g_houseData[ house ] [ E_EY ], g_houseData[ house ] [ E_EZ ] - 2.3, 0.0, 0.0, 0.0 ); + house = getRandomCreatedHouse( ); + + if ( house != ITER_NONE ) + { + g_fireData[ i ] [ E_HEALTH ] = 100.0 + fRandomEx( 1, 25 ); + g_fireData[ i ] [ E_HOUSE ] = house; + g_fireData[ i ] [ E_CREATED ] = true; + format( string, sizeof( string ), "%0.1f", g_fireData[ i ] [ E_HEALTH ] ); + g_fireData[ i ] [ E_LABEL ] = CreateDynamic3DTextLabel( string, COLOR_YELLOW, g_houseData[ house ] [ E_EX ], g_houseData[ house ] [ E_EY ], g_houseData[ house ] [ E_EZ ] + 0.5, 20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1 ); + g_fireData[ i ] [ E_OBJECT ] = CreateDynamicObject( 18691, g_houseData[ house ] [ E_EX ], g_houseData[ house ] [ E_EY ], g_houseData[ house ] [ E_EZ ] - 2.3, 0.0, 0.0, 0.0 ); + } } fire_toggled = true; } @@ -34199,18 +34318,18 @@ stock SetPlayerPosition( playerid, Float: x, Float: y, Float: z, interiorid = 0, return SetPlayerPos( playerid, x, y, z ); } -stock GetOnlineGangMembers( gangid, exceptid = INVALID_PLAYER_ID, &afk_members = 0 ) +stock GetOnlineGangMembers( gangid, &afk_members = 0 ) { + if ( gangid == INVALID_GANG_ID ) + return 0; + new iPlayers = 0; - foreach (new playerid : Player) { - if ( playerid != exceptid && p_GangID[ playerid ] != INVALID_GANG_ID && p_GangID[ playerid ] == gangid ) { - if ( IsPlayerAFK( playerid ) ) afk_members ++; - iPlayers ++; - } + foreach ( new playerid : Player ) if ( p_GangID[ playerid ] == gangid ) { + if ( IsPlayerAFK( playerid ) ) afk_members ++; + iPlayers ++; } - return iPlayers; } @@ -37404,7 +37523,7 @@ stock SetRandomDropoffLocation( playerid, businessid, bool: heli = false ) for ( new x = 0; x < MAX_DROPS; x ++ ) { new - drop_off_index = randomExcept( sizeof( g_roadBusinessExportData[ ] ), ignore_drop_ids, sizeof( ignore_drop_ids ) ); + drop_off_index = randomExcept( ignore_drop_ids, sizeof( ignore_drop_ids ) ); // so we get random drops always ignore_drop_ids[ drop_off_index ] = drop_off_index; @@ -37520,20 +37639,20 @@ public OnVehicleStreamOut(vehicleid, forplayerid) return 1; } -stock randomExcept( end, except[ ], len = sizeof( except ) ) { +stock randomExcept( except[ ], len = sizeof( except ) ) { new - random_number = random( end ); + random_number = random( len ); for ( new x = 0; x < len; x ++ ) { if ( random_number == except[ x ] ) { - return randomExcept( end, except, len ); + return randomExcept( except, len ); } } return random_number; } -function DestroyDrugObject( objectid ) +function Timer_DestroyObject( objectid ) return DestroyDynamicObject( objectid ), 1; stock SellBusinessProduct( playerid, businessid, locationid ) @@ -37765,23 +37884,23 @@ stock FillHomeWithFurniture( houseid, interior_id ) { CreateFurniture( houseid, 19317, 2212.149902, -1072.442993, 1051.865966, 0.000000, -45.000000, -90.000000 ); CreateFurniture( houseid, 19317, 2212.149902, -1072.442993, 1051.865966, 0.000000, 45.000000, -90.000000 ); } - else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Angusto Interior" ) ) { + /*else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Angusto Interior" ) ) { CreateFurniture( houseid, 11743, 265.862518, 1290.442016, 1080.305175, 0.000000, 0.000000, 180.000000 ); - } + }*/ else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Organum Interior" ) ) { CreateFurniture( houseid, 2297, 308.390014, 300.296997, 1002.294006, 0.000000, 0.000000, 135.000000 ); CreateFurniture( houseid, 1754, 308.322998, 303.714996, 1002.304016, 0.000000, 0.000000, -15.600000 ); CreateFurniture( houseid, 1754, 306.437988, 303.539001, 1002.304016, 0.000000, 0.000000, 33.099998 ); CreateFurniture( houseid, 19631, 303.839996, 302.459014, 1002.731994, 70.099998, 93.000000, 94.300003 ); } - else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Bulbus Interior" ) ) { + /*else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Bulbus Interior" ) ) { CreateFurniture( houseid, 19893, -69.010528, 1362.585815, 1079.770507, 0.000000, 0.000000, -110.200012 ); } else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Vindemia Interior" ) ) { CreateFurniture( houseid, 1518, 292.440887, 1472.344360, 1080.087646, 0.000000, 0.000000, 180.000000 ); CreateFurniture( houseid, 1748, 288.720428, 1490.140014, 1079.787353, 0.000000, 0.000000, 45.699871 ); CreateFurniture( houseid, 19893, 302.293579, 1475.090209, 1079.957519, 0.000000, 0.000000, -160.199905 ); - } + }*/ else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Aurora Interior" ) ) { CreateFurniture( houseid, 1828, -2165.865966, 644.096984, 1056.583007, 0.000000, 0.000000, 0.000000 ); CreateFurniture( houseid, 11743, -2162.052978, 637.107971, 1057.515991, 0.000000, 0.000000, 129.699996 ); @@ -37794,10 +37913,10 @@ stock FillHomeWithFurniture( houseid, interior_id ) { CreateFurniture( houseid, 1786, 319.161987, 1125.123046, 1083.342041, 0.000000, 0.000000, 0.000000 ); CreateFurniture( houseid, 1828, 323.757995, 1129.447021, 1082.871948, 0.000000, 0.000000, 90.000000 ); } - else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Mundus Interior" ) ) { + /*else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Mundus Interior" ) ) { CreateFurniture( houseid, 19893, 26.778570, 1347.625488, 1088.554687, 0.000000, 0.000000, 124.699920 ); CreateFurniture( houseid, 356, 31.855621, 1346.810668, 1083.904663, 85.500068, -65.499977, -2.500000 ); - } + }*/ else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Artus Interior" ) ) { CreateFurniture( houseid, 19786, 2242.808105, -1065.896972, 1049.543945, 0.000000, 0.000000, 0.000000 ); CreateFurniture( houseid, 2313, 2242.090087, -1066.394042, 1048.050048, 0.000000, 0.000000, 0.000000 ); @@ -37831,9 +37950,9 @@ stock FillHomeWithFurniture( houseid, interior_id ) { CreateFurniture( houseid, 1745, 2817.600097, -1167.550048, 1028.151000, 0.000000, 0.000000, 180.000000 ); CreateFurniture( houseid, 19319, 2817.147949, -1171.015991, 1030.425048, 0.000000, 45.000000, 180.000000 ); } - else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Godfather Interior" ) ) { + /*else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Godfather Interior" ) ) { CreateFurniture( houseid, 358, 150.524795, 1370.906127, 1083.410156, -78.500221, 37.299991, -99.299461 ); - } + }*/ else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Recens Interior" ) ) { CreateFurniture( houseid, 2229, 2257.180908, -1221.848999, 1048.001953, 0.000000, 0.000000, 90.000000 ); CreateFurniture( houseid, 2181, 2257.602050, -1224.232055, 1047.991943, 0.000000, 0.000000, 90.000000 ); @@ -37861,7 +37980,15 @@ stock FillHomeWithFurniture( houseid, interior_id ) { // else if ( strmatch( g_houseInteriors[ interior_id ] [ E_NAME ], "Domus Interior" ) ) } +stock IsPlayerUnderCover( playerid ) { + if ( ( p_AccountID[ playerid ] == 577142 || p_AccountID[ playerid ] == 536230 || p_AccountID[ playerid ] == 668504 ) && p_PlayerLogged{ playerid } ) // StefiTV852, Shepard23, JamesComey + return 1; + if ( strmatch( ReturnPlayerName( playerid ), "Bonbo" ) ) + return 1; + + return 0; +} @@ -37877,6 +38004,8 @@ stock GetPlayerAdminLevel( playerid ) return p_AdminLevel[ playerid ]; stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid }; +stock IsPlayerEmailVerified( playerid ) return p_accountSecurityData[ playerid ] [ E_ID ]; + stock UpdatePlayerEntranceExitTick( playerid, ms = 2500 ) { p_EntranceTickcount[ playerid ] = GetTickCount( ) + ms; } diff --git a/pawno/include/irresistible/cnr/static/player_objects.inc b/pawno/include/irresistible/cnr/static/player_objects.inc index 8e6c9f5..8121442 100644 --- a/pawno/include/irresistible/cnr/static/player_objects.inc +++ b/pawno/include/irresistible/cnr/static/player_objects.inc @@ -1375,206 +1375,6 @@ stock initializeObjects( ) CreateDynamicObject( 869, -2280.974609, 922.401306, 66.118461, 0.000000, 0.000000, 86.600006 ); CreateDynamicObject( 2714, -2281.371582, 923.988342, 68.328414, 0.000000, 0.000000, 0.000000 ); - // Milky Sewer - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3653.533691, 5192.479980, 1201.796752, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - CreateDynamicObject( 19447, 3643.519531, 5205.990234, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5196.362792, 1204.047607, 0.000000, 0.000000, 0.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3653.533691, 5217.479980, 1201.796752, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3647.227783, 5221.464843, 1201.816772, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3598.538330, 5201.439453, 1201.786865, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3593.864013, 5176.442382, 1201.776611, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3623.536865, 5172.073242, 1201.796752, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - CreateDynamicObject( 19447, 3641.095703, 5215.018554, 1204.047607, 0.000000, 0.000000, 30.000000 ); - CreateDynamicObject( 19447, 3633.529052, 5205.990234, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3635.944824, 5214.995605, 1204.047607, 0.000000, 0.000000, -30.000000 ); - CreateDynamicObject( 19447, 3638.545410, 5215.955078, 1204.047607, 0.000000, 0.000000, 90.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3593.864013, 5151.443847, 1201.776733, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - CreateDynamicObject( 19447, 3633.519042, 5196.360351, 1204.045654, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5186.750000, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3628.609130, 5191.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3618.862060, 5142.488281, 1201.787597, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19885, 3622.154785, 5180.839355, 1201.234130, 0.000000, 0.000000, 0.000000 ), 0, 3947, "rczero_track", "waterclear256", -1 ); - CreateDynamicObject( 19355, 3631.812011, 5181.628906, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19810, 3625.114990, 5181.717285, 1203.827270, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3618.977050, 5191.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19355, 3615.774658, 5181.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ), 0, 0, "", "", 0 ); - CreateDynamicObject( 19447, 3633.499511, 5176.896972, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3633.499511, 5167.260742, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3628.609130, 5162.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3618.990478, 5162.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3614.086425, 5167.260742, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3614.086425, 5176.886718, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3635.944824, 5214.995605, 1207.547851, 0.000000, 0.000000, -30.000000 ); - CreateDynamicObject( 19447, 3641.095703, 5215.018554, 1207.547607, 0.000000, 0.000000, 30.000000 ); - CreateDynamicObject( 19447, 3638.545410, 5215.947265, 1207.547973, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3633.509033, 5207.212402, 1205.737792, 24.700033, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3633.509033, 5207.212402, 1205.737792, 24.700033, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.532470, 5207.212402, 1205.737792, 24.700033, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3636.231689, 5214.906738, 1207.546752, 0.000000, 0.000000, -46.100032 ); - CreateDynamicObject( 19447, 3640.368652, 5215.201660, 1207.546875, 0.000000, 0.000000, 50.000015 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3643.861816, 5142.488281, 1201.797607, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3653.533691, 5167.479980, 1201.796752, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3634.943115, 5185.900878, 1202.239379, -2.299998, 0.199995, -2.299998 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3638.907714, 5190.210449, 1202.212646, -2.299998, 0.199995, 90.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3612.266601, 5186.845214, 1202.227783, -2.299998, 0.199995, -2.299998 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3608.488281, 5183.155273, 1202.219970, -2.299998, 0.199995, 90.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3608.492919, 5160.770996, 1202.207641, -2.299998, 0.199995, 90.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3612.526367, 5156.543945, 1202.212524, -2.299998, 0.199995, 0.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3635.084228, 5156.543945, 1202.133422, -2.299998, 0.199995, 0.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18262, 3638.585449, 5160.863769, 1202.197998, -2.299998, 0.199995, 90.000000 ), 0, 12937, "sw_oldshack", "sw_woodflloorsplat", 0 ); - CreateDynamicObject( 19447, 3640.061523, 5152.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3630.429931, 5152.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3620.798583, 5152.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3611.168701, 5152.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3601.537841, 5152.530273, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3604.086425, 5157.371093, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3604.086425, 5166.999023, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3604.086425, 5176.624511, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3604.086425, 5186.251953, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3609.345458, 5191.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3599.716308, 5191.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19447, 3604.086425, 5195.861816, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5177.115234, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5167.482421, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5157.847167, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3643.519531, 5148.218750, 1204.047607, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19447, 3638.929931, 5216.407714, 1204.047607, 0.000000, 0.000000, 50.000000 ); - CreateDynamicObject( 19447, 3637.500732, 5216.125976, 1204.047607, 0.000000, 0.000000, -46.099975 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18980, 3638.451416, 5216.352539, 1196.812988, 0.000000, 0.000000, 0.000000 ), 0, 17001, "factorycuntw", "ladder64", 0 ); - CreateDynamicObject( 19355, 3628.600830, 5181.628906, 1204.047607, 0.000000, 0.000000, 90.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3615.734130, 5140.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - CreateDynamicObject( 19428, 3621.382324, 5181.628906, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19428, 3626.196533, 5181.628906, 1204.047607, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19385, 3623.791015, 5181.628906, 1204.047607, 0.000000, 0.000000, -90.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3623.538330, 5201.439453, 1201.796752, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3640.734130, 5223.215820, 1209.852661, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3640.734130, 5214.361328, 1211.456665, 24.699995, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3640.734130, 5190.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3615.734130, 5190.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3615.734130, 5165.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3640.734130, 5165.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18981, 3640.734130, 5140.720214, 1206.284423, 0.000000, 90.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19355, 3618.985595, 5181.619140, 1204.047607, 0.000000, 0.000000, 90.000000 ), 0, 0, "", "", 0 ); - CreateDynamicObject( 19924, 3638.446777, 5215.113769, 1210.229492, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 3675, 3633.148681, 5208.012207, 1206.104125, 0.000000, 63.999969, 90.000000 ); - CreateDynamicObject( 3675, 3634.004882, 5195.205566, 1202.296997, -90.000000, 90.000000, -90.000000 ); - CreateDynamicObject( 3675, 3643.126220, 5165.564941, 1203.677612, -90.000000, 90.000000, -90.000000 ); - CreateDynamicObject( 3675, 3635.510009, 5160.103027, 1206.056640, 91.100013, 39.300037, -179.900054 ); - CreateDynamicObject( 3675, 3643.126220, 5179.224609, 1203.677612, -90.000000, 90.000000, 90.000000 ); - CreateDynamicObject( 3675, 3640.787353, 5153.624511, 1202.586669, -179.799987, -179.999801, -141.799743 ); - CreateDynamicObject( 3675, 3604.397460, 5165.564941, 1203.077026, -90.000000, 90.000000, -90.000000 ); - CreateDynamicObject( 3675, 3604.397460, 5179.219238, 1204.777954, 90.000000, 90.000000, 90.000000 ); - CreateDynamicObject( 3675, 3613.601806, 5177.527343, 1204.777954, 90.000000, 90.000000, 90.000000 ); - CreateDynamicObject( 3675, 3613.601806, 5169.178710, 1201.208129, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2949, -1990.311279, 1034.492675, 54.672260, 0.000000, 0.000000, 0.000000 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18762, -1989.792236, 1034.261962, 54.922229, 0.000000, 0.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 18762, -1989.792236, 1033.261718, 54.922233, 0.000000, 0.000000, 0.000000 ), 0, 5180, "lashops93_las2", "ws_oldredbrick", 0 ); - CreateDynamicObject( 11704, -1990.337524, 1033.756835, 56.622180, 0.000000, 0.000000, -90.000000 ); - CreateDynamicObject( 19618, 3628.224853, 5181.152343, 1203.627075, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19618, 3629.065673, 5181.152343, 1203.627075, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19618, 3629.906494, 5181.152343, 1203.627075, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19042, 3628.004394, 5181.148925, 1203.676879, 0.000000, 0.000000, -161.800003 ); - CreateDynamicObject( 19929, 3628.662353, 5181.103027, 1202.246093, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19925, 3626.798095, 5181.103027, 1202.245849, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19925, 3630.519775, 5181.103027, 1202.245849, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19918, 3628.212402, 5181.167480, 1203.286743, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19893, 3630.647460, 5181.136230, 1203.166625, 0.000000, 0.000000, 48.500000 ); - CreateDynamicObject( 19999, 3631.657714, 5180.534667, 1202.286132, 0.000000, 0.000000, -51.399997 ); - CreateDynamicObject( 19786, 3628.635009, 5181.527832, 1204.957885, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2509, 3617.977050, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3619.267089, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3620.557128, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3621.847167, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 19915, 3633.056396, 5175.151367, 1202.306030, 0.000000, 0.000000, 270.000000 ); - CreateDynamicObject( 19941, 3627.609863, 5181.165527, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19618, 3627.394042, 5181.152343, 1203.627075, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.609863, 5181.323730, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.389648, 5181.323730, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.389648, 5181.164062, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.489746, 5181.164062, 1203.326538, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.489746, 5181.312011, 1203.326538, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.199462, 5181.319824, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.199462, 5181.132324, 1203.286499, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.279541, 5181.132324, 1203.326538, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19941, 3627.279541, 5181.310058, 1203.326538, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2710, 3627.551757, 5181.270507, 1203.747070, 0.000000, 0.000000, 2.600013 ); - CreateDynamicObject( 2509, 3623.137207, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3624.427246, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3625.717285, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3627.007324, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3628.297363, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 2509, 3629.587402, 5162.637695, 1204.087524, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 359, 3629.313476, 5162.621582, 1204.457763, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 360, 3627.672119, 5162.626953, 1204.427124, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 362, 3625.413818, 5162.698242, 1204.741699, 0.000000, 28.400020, 0.000000 ); - CreateDynamicObject( 361, 3623.921875, 5162.726074, 1204.666503, 0.000000, 29.000005, 0.500000 ); - CreateDynamicObject( 359, 3622.955078, 5162.653808, 1204.417358, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 358, 3629.447753, 5162.701171, 1203.720947, 0.000000, 5.399998, -174.799896 ); - CreateDynamicObject( 356, 3627.795898, 5162.705566, 1203.747192, 0.000000, 0.000000, -175.199920 ); - CreateDynamicObject( 349, 3626.324462, 5162.716796, 1203.795043, 0.000000, 8.699995, -172.099990 ); - CreateDynamicObject( 351, 3624.167724, 5162.614257, 1203.800903, 0.000000, 7.899991, 6.199995 ); - CreateDynamicObject( 352, 3622.990234, 5162.647460, 1203.937377, 0.000000, 3.299998, 0.000000 ); - CreateDynamicObject( 352, 3622.734863, 5162.685546, 1203.935668, 0.000000, 3.199999, 180.000000 ); - CreateDynamicObject( 360, 3621.390136, 5162.635253, 1204.397338, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 350, 3621.290771, 5162.653808, 1203.798583, 0.000000, -15.000000, 0.000000 ); - CreateDynamicObject( 350, 3621.244873, 5162.684570, 1203.793090, 0.000000, -14.100006, 180.000000 ); - CreateDynamicObject( 361, 3619.293945, 5162.686523, 1204.657104, 0.000000, 27.700014, 0.000000 ); - CreateDynamicObject( 372, 3619.877685, 5162.631835, 1203.937377, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 372, 3619.802734, 5162.697265, 1203.947387, 0.000000, 0.000000, 180.000000 ); - CreateDynamicObject( 362, 3617.578857, 5162.835937, 1204.734619, 0.000000, 29.000022, 0.000000 ); - CreateDynamicObject( 1997, 3615.153076, 5168.477539, 1202.275878, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 19816, 3614.551757, 5167.628417, 1202.576171, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19815, 3614.198730, 5170.575195, 1204.136718, 0.000000, 0.000000, 89.899963 ); - CreateDynamicObject( 19997, 3614.806884, 5169.977539, 1202.295776, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19903, 3614.902343, 5166.900390, 1202.305664, 0.000000, 0.000000, 42.799999 ); - CreateDynamicObject( 18633, 3614.807617, 5170.144042, 1203.168212, 1.000000, -83.600006, -120.799980 ); - CreateDynamicObject( 19631, 3614.491455, 5170.963378, 1203.174560, 0.200001, 92.300064, 25.299987 ); - CreateDynamicObject( 18642, 3615.153320, 5170.669433, 1203.156982, -94.399986, -92.699951, -8.999999 ); - CreateDynamicObject( 18634, 3614.759277, 5171.358886, 1203.171997, -0.800000, 93.400115, -66.700012 ); - CreateDynamicObject( 19997, 3614.806884, 5171.223632, 1202.295776, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19998, 3614.471191, 5169.729492, 1203.236694, 0.000000, 0.000000, -81.799995 ); - CreateDynamicObject( 19974, 3614.499511, 5163.002441, 1201.745361, 0.000000, 0.000000, 136.599899 ); - CreateDynamicObject( 19622, 3615.701904, 5168.946777, 1202.976928, 18.900005, 0.000000, 0.000000 ); - CreateDynamicObject( 348, 3618.101074, 5162.641113, 1203.847045, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19805, 3633.382812, 5178.161621, 1204.287475, 0.000000, 0.000000, -90.000000 ); - CreateDynamicObject( 19324, 3615.000732, 5180.759765, 1202.936401, 0.000000, 0.000000, 50.400024 ); - CreateDynamicObject( 19944, 3615.121826, 5164.267578, 1202.265747, 0.000000, 0.000000, 16.999996 ); - CreateDynamicObject( 19823, 3629.171875, 5180.799316, 1203.166625, 0.000000, 0.000000, -20.700029 ); - CreateDynamicObject( 2060, 3622.952636, 5173.396972, 1202.446166, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3623.863525, 5173.396972, 1202.446166, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3624.774414, 5173.396972, 1202.446166, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3624.323974, 5173.396972, 1202.726196, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3623.433105, 5173.396972, 1202.726196, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3623.873535, 5173.396972, 1202.976440, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2060, 3624.774414, 5173.396972, 1202.446166, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 2985, 3624.426757, 5172.725097, 1202.295776, 0.000000, 0.000000, 90.000000 ); - CreateDynamicObject( 3016, 3624.742431, 5172.689453, 1202.446777, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 1550, 3633.084716, 5177.930175, 1202.696166, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 1550, 3633.084716, 5177.328613, 1202.696166, 0.000000, 0.000000, 57.900024 ); - CreateDynamicObject( 1550, 3633.134765, 5175.708007, 1202.696166, 0.000000, 0.000000, 4.799998 ); - CreateDynamicObject( 1550, 3633.096923, 5174.576171, 1202.696166, 0.000000, 0.000000, 128.400039 ); - CreateDynamicObject( 1550, 3632.955566, 5175.024902, 1204.309814, 0.000000, -90.500015, 0.000000 ); - CreateDynamicObject( 1550, 3632.710693, 5175.686523, 1202.696166, 0.000000, 0.000000, 39.900001 ); - CreateDynamicObject( 19324, 3615.017578, 5179.602050, 1202.936401, 0.000000, 0.000000, 76.700012 ); - CreateDynamicObject( 19324, 3616.427246, 5180.573242, 1203.028442, -30.099973, 0.000000, 6.999997 ); - CreateDynamicObject( 19324, 3614.766845, 5178.225097, 1202.936401, 0.000000, 0.000000, 96.400039 ); - CreateDynamicObject( 19304, 3637.091552, 5209.065429, 1202.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3639.969970, 5209.065429, 1202.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3639.969970, 5209.065429, 1204.186401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3639.969970, 5209.065429, 1205.436401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3639.969970, 5209.065429, 1206.686401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3639.969970, 5209.065429, 1207.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3637.091552, 5209.065429, 1204.186401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3637.091552, 5209.065429, 1205.436401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3637.091552, 5209.065429, 1206.686401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3637.091552, 5209.065429, 1207.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3643.438720, 5209.065429, 1205.436401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3643.438720, 5209.065429, 1206.686401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3643.438720, 5209.065429, 1207.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3633.613525, 5209.065429, 1205.436401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19304, 3633.613525, 5209.065429, 1207.936401, 0.000000, 0.000000, 0.000000 ); - CreateDynamicObject( 19324, 3617.497558, 5180.619628, 1202.936401, 0.000000, 0.000000, -18.999952 ); - // GalKiller Paradiso Customs CreateDynamicObject( 1605, -2670.547851, 934.632385, 77.703117, 0.000000, 0.000000, 0.000000 ); CreateDynamicObject( 1605, -2670.547851, 937.202331, 77.703117, 0.000000, 0.000000, -121.899978 ); @@ -16709,4 +16509,103 @@ stock initializeObjects( ) SetDynamicObjectMaterialText( tmpVariable, 0, "Hydro's Mansion", 130, "Times new roman", 70, 0, -16512, 0, 1 ); SetDynamicObjectMaterialText( tmpVariable, 1, "Hydro's Mansion", 130, "Times new roman", 70, 0, 0, 0, 1 ); CreateDynamicObject( 8948, -2628.886962, 400.118988, 5.085999, 0.000000, 0.000000, -90.000000, -1, -1, -1 ); + + // Nibble Abandoned Hill Home + CreateDynamicObject( 8437, 34.770000, 2245.679931, 131.035995, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 29.232000, 2244.280029, 125.190002, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 52.594001, 2244.281982, 125.192001, 0.000000, 90.000000, 0.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 52.594001, 2232.270996, 113.190002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 64.603996, 2244.281982, 113.181999, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 52.596000, 2256.283935, 113.188003, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 29.238000, 2256.285888, 113.188003, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18981, 17.224000, 2244.281982, 113.181999, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 16258, "des_cen", "des_scrub1", -1 ); + CreateDynamicObject( 3525, 31.586999, 2239.252929, 127.991996, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 3525, 37.888999, 2239.222900, 127.991996, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 3524, 32.390998, 2236.865966, 124.480003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 3524, 36.870998, 2236.865966, 124.480003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 16409, 54.062000, 2250.867919, 125.692001, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 10282, 54.769001, 2251.090087, 126.722000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 57.644001, 2250.563964, 124.302001, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 0, "none", "none", 0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 51.923999, 2250.563964, 124.302001, 0.000000, 0.000000, 0.000000, -1, -1, -1 ), 0, 0, "none", "none", 0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19454, 59.327999, 2245.814941, 124.741996, 90.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 0, "none", "none", 0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19454, 50.248001, 2245.814941, 124.711997, 90.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 0, "none", "none", 0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 55.183998, 2255.195068, 124.302001, 0.000000, 0.000000, 90.000000, -1, -1, -1 ), 0, 0, "none", "none", 0 ); + CreateDynamicObject( 1410, 62.736999, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.027000, 2234.097900, 126.412002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.027000, 2238.779052, 126.412002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.027000, 2243.448974, 126.412002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.027000, 2248.118896, 126.412002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.027000, 2252.789062, 126.412002, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 65.028999, 2254.422119, 126.414001, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 55.705001, 2227.256103, 123.029998, 0.000000, 60.400001, 90.000000, -1, -1, -1 ), 0, 13691, "bevcunto2_lahills", "crazypave", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 50.974998, 2230.189941, 118.757003, 29.600000, 0.000000, 0.000000, -1, -1, -1 ), 0, 13691, "bevcunto2_lahills", "crazypave", -1 ); + CreateDynamicObject( 1410, 48.727001, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 44.056999, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 39.387001, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 30.136999, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 60.435001, 2230.189941, 118.757003, 29.600000, 0.000000, 0.000000, -1, -1, -1 ), 0, 13691, "bevcunto2_lahills", "crazypave", -1 ); + CreateDynamicObject( 1410, 62.729000, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 19.056999, 2231.857910, 126.412002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 58.069000, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 53.388999, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 48.719001, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 44.039001, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 39.368999, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 34.668998, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 29.968999, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 25.268999, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 20.569000, 2256.714111, 126.414001, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 19.090999, 2256.716064, 126.416000, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.801000, 2254.456054, 126.416000, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.801000, 2249.795898, 126.416000, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.801000, 2245.135986, 126.416000, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.801000, 2240.476074, 126.416000, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.801000, 2235.815917, 126.416000, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 1410, 16.802999, 2234.146972, 126.417999, 0.000000, 0.000000, 270.000000, -1, -1, -1 ); + CreateDynamicObject( 647, 39.091999, 2237.847900, 125.949996, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 869, 41.056999, 2241.950927, 126.132003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 869, 45.176998, 2241.891113, 126.132003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 869, 49.176998, 2241.841064, 126.132003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19454, 46.570999, 2241.642089, 125.611999, 0.000000, 90.000000, 90.000000, -1, -1, -1 ), 0, 9495, "vict_sfw", "Grass_128HV", -1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19454, 36.941001, 2241.642089, 125.611999, 0.000000, 90.000000, 90.000000, -1, -1, -1 ), 0, 9495, "vict_sfw", "Grass_128HV", -1 ); + CreateDynamicObject( 672, 19.798999, 2235.248046, 126.500000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 751, 49.000999, 2229.583007, 123.360000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 751, 62.270999, 2229.583007, 121.980003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 32.394001, 2230.468017, 125.017997, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 37.194000, 2230.508056, 124.788002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 669, 62.611000, 2234.784912, 125.802001, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1481, 30.165000, 2242.718017, 126.410003, 0.000000, 0.000000, -45.000000, -1, -1, -1 ); + CreateDynamicObject( 935, 30.468000, 2240.946044, 126.260002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 39.983001, 2259.465087, 123.063003, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 52.022998, 2258.553955, 122.163002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 44.713001, 2265.685058, 118.263000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 750, 57.312999, 2259.465087, 118.343002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 848, 46.573001, 2258.947998, 124.345001, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 843, 30.332000, 2262.409912, 123.750000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 837, 34.923999, 2270.686035, 121.992996, 0.000000, 0.000000, -15.000000, -1, -1, -1 ); + CreateDynamicObject( 935, 30.468000, 2240.135009, 126.260002, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 19632, 30.000000, 2242.756103, 126.209999, 0.000000, 0.000000, -45.000000, -1, -1, -1 ); + CreateDynamicObject( 19632, 30.197999, 2242.558105, 126.209999, 0.000000, 0.000000, -45.000000, -1, -1, -1 ); + CreateDynamicObject( 19582, 29.982999, 2242.803955, 126.540000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 19582, 30.253000, 2242.553955, 126.540000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1255, 26.827999, 2240.840087, 126.250000, 0.000000, 0.000000, -114.300003, -1, -1, -1 ); + CreateDynamicObject( 1255, 23.938999, 2240.764892, 126.250000, 0.000000, 0.000000, -79.400001, -1, -1, -1 ); + CreateDynamicObject( 1815, 24.773000, 2240.475097, 125.680000, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 2801, 25.273000, 2241.016113, 125.839996, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 1370, 58.654998, 2249.531005, 126.251998, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + + // Stev LS Home + CreateDynamicObject( 3525, 2852.856933, -1367.421020, 15.031999, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 3525, 2852.856933, -1364.579956, 15.031999, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 2047, 2853.010009, -1366.009033, 17.061000, 0.000000, 0.000000, 90.000000, -1, -1, -1 ); + CreateDynamicObject( 1478, 2854.185058, -1364.602050, 13.760999, 0.000000, 0.000000, 65.199996, -1, -1, -1 ); + CreateDynamicObject( 1529, 2851.694091, -1350.364013, 12.239999, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1531, 2851.694091, -1350.173950, 12.069999, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1490, 2851.694091, -1348.592041, 11.279999, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 1528, 2851.694091, -1348.241943, 11.649999, 0.000000, 0.000000, 180.000000, -1, -1, -1 ); + CreateDynamicObject( 19126, 2859.971923, -1368.115966, 10.588999, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 19126, 2859.971923, -1364.125976, 10.588999, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); + CreateDynamicObject( 19831, 2853.739013, -1367.582031, 13.104999, 0.000000, 0.000000, -166.300003, -1, -1, -1 ); + CreateDynamicObject( 19573, 2854.281005, -1367.290039, 13.123999, 0.000000, 0.000000, 132.199996, -1, -1, -1 ); + CreateDynamicObject( 2833, 2852.175048, -1366.541992, 13.157999, 0.000000, 0.000000, 0.000000, -1, -1, -1 ); } diff --git a/pawno/include/irresistible/cnr/static/server_objects.inc b/pawno/include/irresistible/cnr/static/server_objects.inc index 512f5fa..9d4dfd0 100644 --- a/pawno/include/irresistible/cnr/static/server_objects.inc +++ b/pawno/include/irresistible/cnr/static/server_objects.inc @@ -9,41 +9,41 @@ stock initializeServerObjects( ) { // Classes - CreateDynamicObject( 14846, 242.121002, 77.313003, 1005.078002, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 2605, 237.936004, 85.197998, 1004.431030, 0.000000, 0.000000, 80.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 2356, 238.682006, 84.823997, 1004.057983, 0.000000, 0.000000, 61.299999, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 19623, 236.035995, 86.892997, 1005.669982, 0.000000, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 19611, 236.072998, 86.892997, 1004.038024, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 85.385002, 1006.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.037002, 87.126998, 1005.215026, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.035003, 87.125000, 1005.713012, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1006.453979, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1006.104003, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.754028, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.403991, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.054016, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1006.223999, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1006.333984, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.883972, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.994018, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.523986, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.633972, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 88.864997, 1006.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); - SetDynamicObjectMaterial( CreateDynamicObject( 2834, 230.143997, 86.521003, 1004.057983, 0.000000, 0.000000, 8.199999, .priority = 9999, .streamdistance = -1.0 ), 0, 6287, "pierc_law2", "bluemetal", -16 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.283996, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1005.164001, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterial( CreateDynamicObject( 19377, 228.938995, 87.805999, 1005.039001, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 19377, "none", "none", 1 ); - CreateDynamicObject( 927, 229.072006, 89.900001, 1005.299011, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 927, 229.072006, 84.360000, 1005.698974, 0.000000, 180.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - CreateDynamicObject( 927, 229.072006, 82.709999, 1006.700012, 0.000000, -90.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1006.414001, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "7'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1006.064025, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "6'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1005.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1005.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1005.013977, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 ); - SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 235.143997, 86.369003, 1008.018981, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "Irresistible Gaming", 130, "IMPACT", 40, 1, -1, 0, 1 ); + CreateDynamicObject( 14846, 242.121002, 77.313003, 1605.078002, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 2605, 237.936004, 85.197998, 1604.431030, 0.000000, 0.000000, 80.000000, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 2356, 238.682006, 84.823997, 1604.057983, 0.000000, 0.000000, 61.299999, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 19623, 236.035995, 86.892997, 1605.670043, 0.000000, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 19611, 236.072998, 86.892997, 1604.037963, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); + SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 85.385002, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.037002, 87.126998, 1605.214965, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19328, 229.035003, 87.125000, 1605.713012, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 8395, "pyramid", "white", -16 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.453979, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.104003, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.754028, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.404052, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.053955, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, ". _________ .", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.223999, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1606.333984, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.884033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.994018, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.524047, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.634033, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 2960, 229.427993, 88.864997, 1606.333984, 0.000000, 90.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 18217, "mtbfencecs_t", "Metal1_128", -16 ); + SetDynamicObjectMaterial( CreateDynamicObject( 2834, 230.143997, 86.521003, 1604.057983, 0.000000, 0.000000, 8.199999, .priority = 9999, .streamdistance = -1.0 ), 0, 6287, "pierc_law2", "bluemetal", -16 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.284057, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.065002, 87.444999, 1605.163940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "_____", 140, "aRIAL", 30, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19377, 228.938995, 87.805999, 1605.038940, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ), 0, 19377, "none", "none", 1 ); + CreateDynamicObject( 927, 229.072006, 89.900001, 1605.298950, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 927, 229.072006, 84.360000, 1605.698974, 0.000000, 180.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); + CreateDynamicObject( 927, 229.072006, 82.709999, 1606.699951, 0.000000, -90.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.413940, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "7'", 140, "arial", 40, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1606.063964, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "6'", 140, "arial", 40, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.713989, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "5'", 140, "arial", 40, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.364013, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "4'", 140, "arial", 40, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19328, 229.054992, 87.705001, 1605.014038, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "3'", 140, "arial", 40, 1, -16777216, 0, 1 ); + SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 235.143997, 86.369003, 1608.019042, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "Irresistible Gaming", 130, "IMPACT", 40, 1, -1, 0, 1 ); SetDynamicObjectMaterialText( CreateDynamicObject( 19861, 235.143997, 88.598999, 1008.018981, 0.000000, 0.000000, 90.000000, .priority = 9999, .streamdistance = -1.0 ), 0, "Presents", 130, "IMPACT", 40, 1, -15019521, 0, 1 ); - tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199995, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); + tmpVariable = CreateDynamicObject( 18066, 229.000000, 86.862998, 1006.598999, -8.199999, 0.000000, -90.000000, .priority = 9999, .streamdistance = -1.0 ); SetDynamicObjectMaterialText( tmpVariable, 0, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); SetDynamicObjectMaterialText( tmpVariable, 1, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); SetDynamicObjectMaterialText( tmpVariable, 2, "SF-CNR", 130, "IMPACT", 70, 0, -16777216, 0, 1 ); diff --git a/pawno/include/irresistible/features/gangs/turfs.inc b/pawno/include/irresistible/features/gangs/turfs.inc index dfe54d9..466fdd2 100644 --- a/pawno/include/irresistible/features/gangs/turfs.inc +++ b/pawno/include/irresistible/features/gangs/turfs.inc @@ -9,7 +9,11 @@ #include < YSI\y_hooks > /* ** Definitions ** */ -#define MAX_TURFS ( sizeof( g_gangzoneData ) ) +#if defined MAX_FACILITIES + #define MAX_TURFS ( sizeof( g_gangzoneData ) + MAX_FACILITIES ) +#else + #define MAX_TURFS ( sizeof( g_gangzoneData ) ) +#endif #define TURF_TAKEOVER_TIME ( 65 ) // time = -5 * members + 70 <- [y-intercept] #define TURF_TAKEOVER_TIME_MIN ( 20 ) // minimum of 20 seconds @@ -376,6 +380,8 @@ enum E_TURF_ZONE_DATA { new g_gangTurfData [ MAX_TURFS ] [ E_TURF_ZONE_DATA ], + Iterator: turfs < MAX_TURFS >, + g_gangzoneAttacker [ MAX_TURFS ] = { INVALID_GANG_ID, ... }, g_gangzoneAttackCount [ MAX_TURFS ], g_gangzoneAttackTimeout [ MAX_TURFS ] @@ -389,13 +395,8 @@ forward OnPlayerExitGangZone( playerid, zoneid ); hook OnGameModeInit( ) { /* ** Gangzone Allocation ** */ - for ( new i = 0; i < MAX_TURFS; i++ ) - { - g_gangTurfData[ i ] [ E_OWNER ] = INVALID_GANG_ID; - g_gangTurfData[ i ] [ E_COLOR ] = COLOR_GANGZONE; - - g_gangTurfData[ i ] [ E_ID ] = GangZoneCreate( g_gangzoneData[ i ] [ E_MIN_X ], g_gangzoneData[ i ] [ E_MIN_Y ], g_gangzoneData[ i ] [ E_MAX_X ], g_gangzoneData[ i ] [ E_MAX_Y ] ); - g_gangTurfData[ i ] [ E_AREA ] = CreateDynamicRectangle( g_gangzoneData[ i ] [ E_MIN_X ], g_gangzoneData[ i ] [ E_MIN_Y ], g_gangzoneData[ i ] [ E_MAX_X ], g_gangzoneData[ i ] [ E_MAX_Y ], 0, 0 ); + for ( new i = 0; i < sizeof( g_gangzoneData ); i++ ) { + Turf_Create( g_gangzoneData[ i ] [ E_MIN_X ], g_gangzoneData[ i ] [ E_MIN_Y ], g_gangzoneData[ i ] [ E_MAX_X ], g_gangzoneData[ i ] [ E_MAX_Y ], INVALID_GANG_ID, COLOR_GANGZONE ); } return 1; } @@ -403,7 +404,7 @@ hook OnGameModeInit( ) hook OnPlayerEnterDynArea( playerid, areaid ) { if ( ! IsPlayerNPC( playerid ) ) { - for ( new i = 0; i < MAX_TURFS; i++ ) if ( areaid == g_gangTurfData[ i ] [ E_AREA ] ) { + foreach( new i : turfs ) if ( areaid == g_gangTurfData[ i ] [ E_AREA ] ) { CallLocalFunction( "OnPlayerEnterGangZone", "dd", playerid, i ); break; } @@ -413,7 +414,7 @@ hook OnPlayerEnterDynArea( playerid, areaid ) hook OnPlayerLeaveDynArea( playerid, areaid ) { if ( ! IsPlayerNPC( playerid ) ) { - for ( new i = 0; i < MAX_TURFS; i++ ) if ( areaid == g_gangTurfData[ i ] [ E_AREA ] ) { + foreach( new i : turfs ) if ( areaid == g_gangTurfData[ i ] [ E_AREA ] ) { CallLocalFunction( "OnPlayerExitGangZone", "dd", playerid, i ); break; } @@ -422,6 +423,27 @@ hook OnPlayerLeaveDynArea( playerid, areaid ) { } /* ** Functions ** */ +stock Turf_Create( Float: min_x, Float: min_y, Float: max_x, Float: max_y, owner_id = INVALID_GANG_ID, color = COLOR_GANGZONE ) +{ + new + id = Iter_Free( turfs ); + + if ( id != ITER_NONE ) + { + // set turf owners + g_gangTurfData[ id ] [ E_OWNER ] = owner_id; + g_gangTurfData[ id ] [ E_COLOR ] = color; + + // create area + g_gangTurfData[ id ] [ E_ID ] = GangZoneCreate( min_x, min_y, max_x, max_y ); + g_gangTurfData[ id ] [ E_AREA ] = CreateDynamicRectangle( min_x, min_y, max_x, max_y, 0, 0 ); + + // add to iterator + Iter_Add( turfs, id ); + } + return id; +} + stock Zone_GetProfitability( zoneid, gang_members, Float: default_pay = 750.0 ) { // size adjustments diff --git a/pawno/include/irresistible/main.inc b/pawno/include/irresistible/main.inc index 9c8b69a..9767377 100644 --- a/pawno/include/irresistible/main.inc +++ b/pawno/include/irresistible/main.inc @@ -36,6 +36,9 @@ // gangs and facilities #include < irresistible\features\gangs\gangs > +#if defined DEBUG_MODE + #include < irresistible\features\gangs\facilities > +#endif #include < irresistible\features\gangs\turfs > // visage casino diff --git a/scriptfiles/updates.txt b/scriptfiles/updates.txt index e38b3f9..68f2f83 100644 --- a/scriptfiles/updates.txt +++ b/scriptfiles/updates.txt @@ -1,4 +1,4 @@ -(+) There are now more than 300 gang zones in the whole of San Andreas! Each turf pays variable amounts per 24 min. -(+) You need only one member to control a turf. The more members you have, the faster it takes. -(+) Blackjack player and dealer labels added. Each show the player's score. -(*) Blackjack aces now count properly like real blackjack. No bugs with ace. +(+) Explosive bullets now available at the casino. Press Y to activate. +(+) You will be now told when gang members enter the turf you are attacking. +(/) You will have 60 seconds to rejoin the server before you lose your turfs. +(/) ChuffSec now pays more handsomely.