From 32746cdd209e1a359b646d00b343edcf1adda55f Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Wed, 17 Oct 2018 03:33:27 +1100 Subject: [PATCH] module for static map icons --- gamemodes/irresistible/cnr/static/actors.pwn | 2 +- .../irresistible/cnr/static/map_icons.pwn | 58 +++++++++++++++++++ .../cnr/static/player_objects.pwn | 2 +- .../cnr/static/server_objects.pwn | 2 +- gamemodes/sf-cnr.pwn | 52 ----------------- 5 files changed, 61 insertions(+), 55 deletions(-) create mode 100644 gamemodes/irresistible/cnr/static/map_icons.pwn diff --git a/gamemodes/irresistible/cnr/static/actors.pwn b/gamemodes/irresistible/cnr/static/actors.pwn index dbad0de..d309703 100644 --- a/gamemodes/irresistible/cnr/static/actors.pwn +++ b/gamemodes/irresistible/cnr/static/actors.pwn @@ -86,7 +86,7 @@ new } ; -stock initializeActors( ) +hook OnScriptInit( ) { for( new i = 0; i < sizeof( g_actorData ); i++ ) { diff --git a/gamemodes/irresistible/cnr/static/map_icons.pwn b/gamemodes/irresistible/cnr/static/map_icons.pwn new file mode 100644 index 0000000..6395143 --- /dev/null +++ b/gamemodes/irresistible/cnr/static/map_icons.pwn @@ -0,0 +1,58 @@ +/* + * Irresistible Gaming 2018 + * Developed by Lorenc Pekaj + * Module: cnr\static\map_icons.inc + * Purpose: static map icons in the server + */ + +/* ** Functions ** */ +hook OnScriptInit( ) +{ + // San Fierro + CreateDynamicMapIcon( -1547.4066, 123.6555, 3.55470, 9, 0, -1, -1, -1, 750.0 ); // ShipYard + CreateDynamicMapIcon( -1657.7573, 1210.275, 7.25000, 55, 0, -1, -1, -1, 750.0 ); // Otto's Cars + CreateDynamicMapIcon( -1923.3926, 303.6380, 41.0469, 8, 0, -1, -1, -1, 750.0 ); // BombShop + CreateDynamicMapIcon( -1951.9911, 300.2070, 35.4688, 55, 0, -1, -1, -1, 750.0 ); // WangCars + CreateDynamicMapIcon( -1979.9883, 138.0498, 27.6875, 42, 0, -1, -1, -1, 750.0 ); // TrainStation + CreateDynamicMapIcon( -2172.2017, 252.1113, 35.3388, 19, 0, -1, -1, -1, 750.0 ); // Paintball + CreateDynamicMapIcon( -2455.4487, 503.9236, 30.0781, 30, 0, -1, -1, -1, 750.0 ); // CIA-FBI + CreateDynamicMapIcon( -2489.8660, -16.8687, 25.6172, 58, 0, -1, -1, -1, 750.0 ); // Pawn Store + CreateDynamicMapIcon( -1935.8773, 243.1236, 36.2211, 27, 0, -1, -1, -1, 750.0 ); // Modshop + CreateDynamicMapIcon( -2720.6104, 217.7127, 4.31920, 27, 0, -1, -1, -1, 750.0 ); // Modshop + CreateDynamicMapIcon( -2426.3296, 1021.7617, 50.8859, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray + CreateDynamicMapIcon( -1903.7902, 283.97430, 41.7187, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray + CreateDynamicMapIcon( -1903.7902, 283.97430, 41.7187, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray + // CreateDynamicMapIcon( -1840.3867, 1015.350, 45.6626, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm + + // Las Venturas + CreateDynamicMapIcon( 1973.2057, 2162.2651, 10.6314, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Las Venturas + CreateDynamicMapIcon( 1607.2659, 1815.2485, 10.8203, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Las Venturas + CreateDynamicMapIcon( -320.1947, 1048.2355, 20.3403, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Fort Carson + CreateDynamicMapIcon( -217.8446, 979.07470, 19.5039, 30, 0, -1, -1, -1, 750.0 ); // Police Department - Fort Carson + CreateDynamicMapIcon( -1514.7529, 2518.9282, 56.070, 22, 0, -1, -1, -1, 750.0 ); // Hospital - El Quebrados + CreateDynamicMapIcon( -1390.0563, 2639.0264, 55.984, 30, 0, -1, -1, -1, 750.0 ); // Police Department - El Quebrados + CreateDynamicMapIcon( 1998.7263, 2298.5562, 10.8203, 8, 0, -1, -1, -1, 750.0 ); // BombShop - Las Venturas + CreateDynamicMapIcon( -431.2023, 2241.0063, 42.9834, 30, 0, -1, -1, -1, 750.0 ); // Police Department - El Castillo del Diablo + CreateDynamicMapIcon( 1633.7454, 2330.6860, 10.8203, 9, 0, -1, -1, -1, 750.0 ); // ShipYard + CreateDynamicMapIcon( 2386.8342, 1048.7100, 10.1765, 27, 0, -1, -1, -1, 750.0 ); // Modshop + // CreateDynamicMapIcon( 2597.58000, 2464.270, 10.8200, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm + + // Los Santos + CreateDynamicMapIcon( 626.96450, -571.74460, 17.9207, 30, 0, -1, -1, -1, 750.0 ); // Police Department - Dillimore + CreateDynamicMapIcon( 2031.3892, -1417.7322, 16.9922, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Los Santos + CreateDynamicMapIcon( 1167.1241, -1335.4282, 28.9784, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Los Santos + CreateDynamicMapIcon( 487.39340, -1740.4929, 10.6892, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos + CreateDynamicMapIcon( 1024.9385, -1025.0437, 31.6611, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos + CreateDynamicMapIcon( 2065.3052, -1831.7053, 13.1126, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos + CreateDynamicMapIcon( 2644.8589, -2038.8060, 13.5500, 27, 0, -1, -1, -1, 750.0 ); // Modshop + CreateDynamicMapIcon( 1041.5466, -1023.0604, 31.7067, 27, 0, -1, -1, -1, 750.0 ); // Modshop + CreateDynamicMapIcon( 2635.2529, -2227.0149, 16.2969, 9, 0, -1, -1, -1, 750.0 ); // ShipYard + CreateDynamicMapIcon( 1642.1968, -2335.4983, 13.5469, 5, 0, -1, -1, -1, 750.0 ); // Airport + CreateDynamicMapIcon( 1519.1024, -1451.9186, 13.6816, 30, 0, -1, -1, -1, 750.0 ); // CIA-FBI + CreateDynamicMapIcon( 1749.2073, -1948.8389, 13.4137, 42, 0, -1, -1, -1, 750.0 ); // TrainStation + CreateDynamicMapIcon( 815.69880, -1347.7256, 13.1043, 42, 0, -1, -1, -1, 750.0 ); // TrainStation + CreateDynamicMapIcon( 1911.2578, -1775.8676, 12.9470, 8, 0, -1, -1, -1, 750.0 ); // BombShop + //CreateDynamicMapIcon( 2597.5800, 2464.2700, 10.8200, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm + //CreateDynamicMapIcon( 2456.1423, -1714.9557, 13.1630, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm + return 1; +} diff --git a/gamemodes/irresistible/cnr/static/player_objects.pwn b/gamemodes/irresistible/cnr/static/player_objects.pwn index 1e03c33..f0044f8 100644 --- a/gamemodes/irresistible/cnr/static/player_objects.pwn +++ b/gamemodes/irresistible/cnr/static/player_objects.pwn @@ -6,7 +6,7 @@ */ /* ** Functions ** */ -stock initializeObjects( ) +hook OnScriptInit( ) { // Garden House CreateDynamicObject(636, -2562.06, 329.14, 14.43, 0.00, -90.00, 0.00); diff --git a/gamemodes/irresistible/cnr/static/server_objects.pwn b/gamemodes/irresistible/cnr/static/server_objects.pwn index f829baa..025efae 100644 --- a/gamemodes/irresistible/cnr/static/server_objects.pwn +++ b/gamemodes/irresistible/cnr/static/server_objects.pwn @@ -6,7 +6,7 @@ */ /* ** Functions ** */ -function initializeServerObjects( ) +hook OnScriptInit( ) { // Classes CreateDynamicObject( 14846, 242.121002, 77.313003, 1605.078002, 0.000000, 0.000000, 0.000000, .priority = 9999, .streamdistance = -1.0 ); diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 3801d3d..336ad04 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -326,11 +326,6 @@ public OnGameModeInit() // start map andreas MapAndreas_Init( MAP_ANDREAS_MODE_MINIMAL ); - /* ** Intalize Data ** */ - initializeServerObjects( ); - initializeObjects( ); - initializeActors( ); - /* ** Server Variables ** */ AddServerVariable( "taxtime", "0", GLOBAL_VARTYPE_INT ); AddServerVariable( "taxrate", "1.0", GLOBAL_VARTYPE_FLOAT ); @@ -360,53 +355,6 @@ public OnGameModeInit() DCC_SendChannelMessage( discordGeneralChan, "**The discord plugin has been initiaized.**" ); #endif - /* ** Map Icons ** */ - CreateDynamicMapIcon( -1547.4066, 123.6555, 3.55470, 9, 0, -1, -1, -1, 750.0 ); // ShipYard - CreateDynamicMapIcon( -1657.7573, 1210.275, 7.25000, 55, 0, -1, -1, -1, 750.0 ); // Otto's Cars - CreateDynamicMapIcon( -1923.3926, 303.6380, 41.0469, 8, 0, -1, -1, -1, 750.0 ); // BombShop - CreateDynamicMapIcon( -1951.9911, 300.2070, 35.4688, 55, 0, -1, -1, -1, 750.0 ); // WangCars - CreateDynamicMapIcon( -1979.9883, 138.0498, 27.6875, 42, 0, -1, -1, -1, 750.0 ); // TrainStation - CreateDynamicMapIcon( -2172.2017, 252.1113, 35.3388, 19, 0, -1, -1, -1, 750.0 ); // Paintball - CreateDynamicMapIcon( -2455.4487, 503.9236, 30.0781, 30, 0, -1, -1, -1, 750.0 ); // CIA-FBI - CreateDynamicMapIcon( -2489.8660, -16.8687, 25.6172, 58, 0, -1, -1, -1, 750.0 ); // Pawn Store - // CreateDynamicMapIcon( -1840.3867, 1015.350, 45.6626, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm - CreateDynamicMapIcon( -1935.8773, 243.1236, 36.2211, 27, 0, -1, -1, -1, 750.0 ); // Modshop - CreateDynamicMapIcon( -2720.6104, 217.7127, 4.31920, 27, 0, -1, -1, -1, 750.0 ); // Modshop - CreateDynamicMapIcon( -2426.3296, 1021.7617, 50.8859, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - CreateDynamicMapIcon( -1903.7902, 283.97430, 41.7187, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - CreateDynamicMapIcon( -1903.7902, 283.97430, 41.7187, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - - // Las Venturas - // CreateDynamicMapIcon( 2597.58000, 2464.270, 10.8200, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm - CreateDynamicMapIcon( 1973.2057, 2162.2651, 10.6314, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Las Venturas - CreateDynamicMapIcon( 1607.2659, 1815.2485, 10.8203, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Las Venturas - CreateDynamicMapIcon( -320.1947, 1048.2355, 20.3403, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Fort Carson - CreateDynamicMapIcon( -217.8446, 979.07470, 19.5039, 30, 0, -1, -1, -1, 750.0 ); // Police Department - Fort Carson - CreateDynamicMapIcon( -1514.7529, 2518.9282, 56.070, 22, 0, -1, -1, -1, 750.0 ); // Hospital - El Quebrados - CreateDynamicMapIcon( -1390.0563, 2639.0264, 55.984, 30, 0, -1, -1, -1, 750.0 ); // Police Department - El Quebrados - CreateDynamicMapIcon( 1998.7263, 2298.5562, 10.8203, 8, 0, -1, -1, -1, 750.0 ); // BombShop - Las Venturas - CreateDynamicMapIcon( -431.2023, 2241.0063, 42.9834, 30, 0, -1, -1, -1, 750.0 ); // Police Department - El Castillo del Diablo - CreateDynamicMapIcon( 1633.7454, 2330.6860, 10.8203, 9, 0, -1, -1, -1, 750.0 ); // ShipYard - CreateDynamicMapIcon( 2386.8342, 1048.7100, 10.1765, 27, 0, -1, -1, -1, 750.0 ); // Modshop - - // Los Santos - //CreateDynamicMapIcon( 2597.5800, 2464.2700, 10.8200, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm - CreateDynamicMapIcon( 626.96450, -571.74460, 17.9207, 30, 0, -1, -1, -1, 750.0 ); // Police Department - Dillimore - CreateDynamicMapIcon( 2031.3892, -1417.7322, 16.9922, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Los Santos - CreateDynamicMapIcon( 1167.1241, -1335.4282, 28.9784, 22, 0, -1, -1, -1, 750.0 ); // Hospital - Los Santos - CreateDynamicMapIcon( 487.39340, -1740.4929, 10.6892, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos - CreateDynamicMapIcon( 1024.9385, -1025.0437, 31.6611, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos - CreateDynamicMapIcon( 2065.3052, -1831.7053, 13.1126, 63, 0, -1, -1, -1, 750.0 ); // Paint n Spray - Los Santos - CreateDynamicMapIcon( 2644.8589, -2038.8060, 13.5500, 27, 0, -1, -1, -1, 750.0 ); // Modshop - CreateDynamicMapIcon( 1041.5466, -1023.0604, 31.7067, 27, 0, -1, -1, -1, 750.0 ); // Modshop - CreateDynamicMapIcon( 2635.2529, -2227.0149, 16.2969, 9, 0, -1, -1, -1, 750.0 ); // ShipYard - //CreateDynamicMapIcon( 2456.1423, -1714.9557, 13.1630, 46, 0, -1, -1, -1, 750.0 ); // Weed Farm - CreateDynamicMapIcon( 1642.1968, -2335.4983, 13.5469, 5, 0, -1, -1, -1, 750.0 ); // Airport - CreateDynamicMapIcon( 1519.1024, -1451.9186, 13.6816, 30, 0, -1, -1, -1, 750.0 ); // CIA-FBI - CreateDynamicMapIcon( 1749.2073, -1948.8389, 13.4137, 42, 0, -1, -1, -1, 750.0 ); // TrainStation - CreateDynamicMapIcon( 815.69880, -1347.7256, 13.1043, 42, 0, -1, -1, -1, 750.0 ); // TrainStation - CreateDynamicMapIcon( 1911.2578, -1775.8676, 12.9470, 8, 0, -1, -1, -1, 750.0 ); // BombShop - /* ** Custom Vehicles ** */ g_TrolleyVehicles[ 0 ] = AddStaticVehicle( 457, -2511.7935, 760.5610, 34.8990, 90.6223, 123, 1 ); // trolley g_TrolleyVehicles[ 1 ] = AddStaticVehicle( 457, -2511.5742, 766.5329, 34.8990, 91.5108, 112, 1 ); // trolley