Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Script by: Sasuke_Uchiha
- Map by: Bullet
- Mission Base: Bombing
- Mission Type: Checkpoint bombing
- Mission Type ID: 1
- */
- //==============================================================================
- // Includes
- //==============================================================================
- #include <a_samp>
- #include <crashdetect>
- #include <float>
- #include "..\filterscripts\MM\stuff\defines"
- #include "..\filterscripts\MM\stuff\serverkeymsg"
- //==============================================================================
- // Defines
- //==============================================================================
- #define MISSION_NAME "James Blond: Ocean Docks"
- #define Health 99.0
- #define OBJ_NAME "Meth Storage"
- #define CP_POS 3788.5979,-2610.5916,20.9550
- #define CP_SIZE 3.0
- #define VEHICLE_HEALTH 999.0
- #define CLASS_POSTION 3734.8755,-2448.6968,17.5937
- #define CLASS_CAMERA 3734.9092,-2446.4177,16.7819
- #define CLASS_FACING_AGNLE 358.6529
- #define TEAM_DEFEND_NAME "Army"
- #define TEAM_ATTACK_NAME "Secret Agent"
- #define MAX_MAP_OBJECTS 174
- #define PLACING_TIME 7
- #define SPAWN_PROTECTION true
- //==============================================================================
- // Per mission functions
- //==============================================================================
- enum skindata
- {
- TeamID,
- SkinID,
- Float:SpawnX,
- Float:SpawnY,
- Float:SpawnZ,
- Float:SpawnAngle,
- SpawnInterior,
- VirtualWorld,
- Weapon1,
- Ammo1,
- Weapon2,
- Ammo2,
- Weapon3,
- Ammo3,
- };
- new const SkinData[][skindata] = {
- {TEAM_ATTACK,164,3378.2107,-2676.3521,13.6533, 0.0,0,0,WEAPON_DEAGLE,100,WEAPON_SHOTGUN,100,WEAPON_M4,120},
- {TEAM_DEFEND,287, 3897.6279,-2562.2869,13.4748, 276.4963,0,0,WEAPON_COLT45,280,WEAPON_SHOTGSPA,160,WEAPON_AK47,120}
- };
- new const Float:ExplosionsInfo[][3] = {
- {3788.8623,-2614.1748,20.9550},
- {3788.9985,-2608.7905,20.9550},
- {3789.4688,-2602.5107,20.9475},
- {3776.3284,-2602.2566,19.5277},
- {3771.4536,-2613.5720,13.7770},
- {3769.8782,-2594.3303,13.5878},
- {3755.8762,-2595.3726,13.5853},
- {3753.8472,-2616.3367,14.8469},
- {3744.9270,-2608.6541,13.5791},
- {3745.5149,-2596.9458,12.6798},
- {3739.5044,-2602.4951,13.5727}
- };
- #if MAX_MAP_OBJECTS != 0
- new Object[MAX_MAP_OBJECTS];
- CreateMap()
- {
- Object[0] = CreateObject(5145,3716.7902800,-2447.8562000,2.1381000,0.0000000,0.0000000,0.0000000); //
- Object[1] = CreateObject(3624,3788.1562500,-2493.9843800,16.7266000,0.0000000,0.0000000,0.0000000); //
- Object[2] = CreateObject(3624,3788.1562500,-2455.8828100,16.7266000,0.0000000,0.0000000,0.0000000); //
- Object[3] = CreateObject(3624,3788.1562500,-2417.7890600,16.7266000,0.0000000,0.0000000,0.0000000); //
- Object[4] = CreateObject(3620,3793.1955600,-2364.7067900,25.5156000,3.1416000,0.0000000,1.5708000); //
- Object[5] = CreateObject(3707,3716.2343800,-2452.5937500,20.2031000,0.0000000,0.0000000,0.0000000); //
- Object[6] = CreateObject(3707,3720.3203100,-2530.9140600,19.9766000,0.0000000,0.0000000,0.0000000); //
- Object[7] = CreateObject(3574,3771.0703100,-2520.5468800,15.2188000,0.0000000,0.0000000,0.0000000); //
- Object[8] = CreateObject(3574,3774.7968800,-2534.9531300,15.2188000,0.0000000,0.0000000,0.0000000); //
- Object[9] = CreateObject(3753,3748.0185500,-2571.6135300,3.0391000,3.1416000,0.0000000,0.0000000); //
- Object[10] = CreateObject(3626,3746.4062500,-2453.4843800,14.0781000,3.1416000,0.0000000,0.0000000); //
- Object[11] = CreateObject(3577,3744.5703100,-2427.3203100,13.3516000,356.8584000,0.0000000,-1.5708000); //
- Object[12] = CreateObject(3577,2744.5703100,-2436.1875000,13.3437500,356.8584000,0.0000000,-1.5708000); //
- Object[13] = CreateObject(1306,3742.2915000,-2481.5522500,19.8438000,360.0000000,0.0000000,0.0000000); //
- Object[14] = CreateObject(3578,3747.0078100,-2480.2421900,13.1719000,356.8584000,0.0000000,-1.5708000); //
- Object[15] = CreateObject(3689,3685.3828100,-2366.0546900,19.9531000,0.0000000,0.0000000,0.0000000); //
- Object[16] = CreateObject(3623,2660.4765600,-2429.2968800,17.0703100,356.8584000,0.0000000,3.1415900); //
- Object[17] = CreateObject(3623,3639.5468800,-2429.2968800,17.0703000,0.0000000,0.0000000,0.0000000); //
- Object[18] = CreateObject(3623,3618.8593800,-2429.2968800,17.0703000,0.0000000,0.0000000,0.0000000); //
- Object[19] = CreateObject(3753,32615.1093800,-2464.6171900,3.0391000,3.1416000,0.0000000,0.0000000); //
- Object[20] = CreateObject(5176,3521.5127000,-2606.9633800,17.6484000,0.0000000,0.0000000,0.0000000); //
- Object[21] = CreateObject(3620,3531.3085900,-2570.2050800,25.7446900,0.0000000,0.0000000,2.6400000); //
- Object[22] = CreateObject(3620,3559.0546900,-2563.4646000,25.5156000,0.0000000,0.0000000,0.0000000); //
- Object[23] = CreateObject(3623,3544.2500000,-2548.8125000,16.7031000,0.0000000,0.0000000,0.0000000); //
- Object[24] = CreateObject(3623,3544.2500000,-2524.0937500,16.4453000,0.0000000,0.0000000,0.0000000); //
- Object[25] = CreateObject(3627,3464.3046900,-2617.0156300,16.0469000,356.8584000,0.0000000,3.1416000); //
- Object[26] = CreateObject(3625,3464.1059600,-2571.6391600,15.1641000,3.1416000,0.0000000,1.5708000); //
- Object[27] = CreateObject(1306,3469.6269500,-2645.3330100,19.8438000,356.8584000,0.0000000,-3.1416000); //
- Object[28] = CreateObject(3578,3470.1406300,-2530.5546900,13.1719000,356.8584000,0.0000000,-1.5708000); //
- Object[29] = CreateObject(3689,3410.0791000,-2582.0239300,20.5234000,0.0000000,0.0000000,0.0000000); //
- Object[30] = CreateObject(3753,3347.2592800,-2527.3962400,36.1419800,0.0000000,0.0000000,0.0000000); //
- Object[31] = CreateObject(3624,3415.4609400,-2468.5781300,16.7266000,0.0000000,0.0000000,0.0000000); //
- Object[32] = CreateObject(3744,3437.2109400,-2490.0937500,15.2188000,0.0000000,0.0000000,0.0000000); //
- Object[33] = CreateObject(5146,3498.1953100,-2408.0078100,1.8047000,0.0000000,0.0000000,0.0000000); //
- Object[34] = CreateObject(3707,3539.1796900,-2424.3593800,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[35] = CreateObject(3707,3480.8593800,-2460.0546900,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[36] = CreateObject(1378,3425.7443800,-2431.7775900,36.8808300,0.0000000,0.0000000,-44.4000100); //
- Object[37] = CreateObject(8661,3426.4060100,-2441.6472200,12.4578000,0.0000000,0.0000000,-45.0000000); //
- Object[38] = CreateObject(3673,3564.4306600,-2354.4023400,36.4519000,0.0000000,0.0000000,-44.0000000); //
- Object[39] = CreateObject(3673,3557.0825200,-2360.5993700,36.4519000,0.0000000,0.0000000,-44.0000000); //
- Object[40] = CreateObject(3637,3585.3928200,-2381.0896000,20.2661500,0.0000000,0.0000000,-45.6599900); //
- Object[41] = CreateObject(8661,3576.1970200,-2372.4812000,12.5078200,0.0000000,0.0000000,-47.8200000); //
- Object[42] = CreateObject(8661,3589.0402800,-2358.5805700,12.3035400,0.0000000,0.0000000,-47.8200000); //
- Object[43] = CreateObject(5326,3661.5156300,-2465.1406300,19.8130000,360.0000000,0.0000000,0.0000000); //
- Object[44] = CreateObject(1306,3669.9062500,-2518.6640600,19.8438000,356.8584000,0.0000000,-3.1416000); //
- Object[45] = CreateObject(1306,3669.3635300,-2394.9641100,19.1305500,356.8584000,0.0000000,-3.1416000); //
- Object[46] = CreateObject(1278,3674.5234400,-2557.4921900,26.7031000,3.1416000,0.0000000,0.8727000); //
- Object[47] = CreateObject(5131,3768.9155300,-2593.3337400,18.9394000,0.0000000,0.0000000,90.0000000); //
- Object[48] = CreateObject(8661,3769.1257300,-2575.1491700,12.6436200,0.0000000,0.0000000,2.0000000); //
- Object[49] = CreateObject(8661,3755.1643100,-2589.7819800,12.5651000,0.0000000,0.0000000,2.0000000); //
- Object[50] = CreateObject(8661,3729.2985800,-2575.8999000,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[51] = CreateObject(5262,3745.1066900,-2593.5227100,15.2510500,0.0000000,0.0000000,0.0000000); //
- Object[52] = CreateObject(5260,3737.1293900,-2603.3283700,14.0878000,0.0000000,0.0000000,-90.0000000); //
- Object[53] = CreateObject(5259,3737.1218300,-2611.3601100,14.2753400,0.0000000,0.0000000,0.0000000); //
- Object[54] = CreateObject(5261,3765.8898900,-2614.5122100,12.5628600,0.0000000,0.0000000,-88.2600300); //
- Object[55] = CreateObject(1575,3790.4668000,-2612.9819300,19.9551400,0.0000000,0.0000000,0.0000000); //
- Object[56] = CreateObject(1575,3786.8999000,-2617.3828100,19.9551400,0.0000000,0.0000000,0.0000000); //
- Object[57] = CreateObject(1575,3786.9597200,-2604.5063500,19.9551400,0.0000000,0.0000000,0.0000000); //
- Object[58] = CreateObject(1575,3787.8808600,-2617.3591300,19.9551400,0.0000000,0.0000000,0.0000000); //
- Object[59] = CreateObject(1576,3790.7067900,-2603.2700200,19.9573700,0.0000000,0.0000000,0.0000000); //
- Object[60] = CreateObject(1576,3785.6127900,-2608.9895000,19.9573700,0.0000000,0.0000000,0.0000000); //
- Object[61] = CreateObject(1576,3787.2793000,-2607.3530300,19.9573700,0.0000000,0.0000000,0.0000000); //
- Object[62] = CreateObject(1576,3787.9697300,-2617.0517600,19.9573700,0.0000000,0.0000000,0.0000000); //
- Object[63] = CreateObject(1577,3791.3696300,-2605.5444300,19.9554800,0.0000000,0.0000000,0.0000000); //
- Object[64] = CreateObject(1577,3789.9687500,-2606.0354000,19.9554800,0.0000000,0.0000000,0.0000000); //
- Object[65] = CreateObject(1577,3789.4567900,-2607.5573700,19.9554800,0.0000000,0.0000000,0.0000000); //
- Object[66] = CreateObject(1577,3790.8283700,-2615.8720700,19.9554800,0.0000000,0.0000000,0.0000000); //
- Object[67] = CreateObject(1578,3788.3689000,-2602.5000000,19.9570200,0.0000000,0.0000000,0.0000000); //
- Object[68] = CreateObject(1578,3787.1240200,-2600.4672900,19.9570200,0.0000000,0.0000000,0.0000000); //
- Object[69] = CreateObject(1578,3791.3076200,-2608.3828100,19.9570200,0.0000000,0.0000000,0.0000000); //
- Object[70] = CreateObject(1578,3790.1787100,-2604.6196300,19.9570200,0.0000000,0.0000000,0.0000000); //
- Object[71] = CreateObject(1579,3786.9023400,-2611.5993700,19.9571100,0.0000000,0.0000000,0.0000000); //
- Object[72] = CreateObject(1579,3790.8720700,-2600.7329100,19.9571100,0.0000000,0.0000000,0.0000000); //
- Object[73] = CreateObject(1579,3787.2978500,-2610.3147000,19.9571100,0.0000000,0.0000000,0.0000000); //
- Object[74] = CreateObject(1579,3788.6591800,-2609.3405800,19.9571100,0.0000000,0.0000000,0.0000000); //
- Object[75] = CreateObject(1580,3786.3981900,-2615.7785600,19.9572100,0.0000000,0.0000000,0.0000000); //
- Object[76] = CreateObject(1580,3788.6989700,-2605.3122600,19.9572100,0.0000000,0.0000000,0.0000000); //
- Object[77] = CreateObject(1580,3789.2023900,-2611.6054700,19.9572100,0.0000000,0.0000000,0.0000000); //
- Object[78] = CreateObject(1580,3788.1096200,-2613.1228000,19.9572100,0.0000000,0.0000000,0.0000000); //
- Object[79] = CreateObject(355,3787.7292500,-2607.8049300,20.0294100,-109.1999600,-14.5200000,0.0000000); //
- Object[80] = CreateObject(3056,3790.5517600,-2610.1464800,19.9711800,-2.7600000,93.7800100,0.0000000); //
- Object[81] = CreateObject(351,3791.5698200,-2603.6401400,20.0374500,-97.5000800,-77.5199900,0.0000000); //
- Object[82] = CreateObject(348,3788.0830100,-2604.2216800,19.9643500,90.0000000,0.4200000,0.0000000); //
- Object[83] = CreateObject(5145,3841.5896000,-2501.5080600,1.9157000,0.0000000,0.0000000,0.0000000); //
- Object[84] = CreateObject(5262,3760.1540500,-2614.6755400,15.2510500,0.0000000,0.0000000,0.0000000); //
- Object[85] = CreateObject(5260,3749.0334500,-2612.9206500,14.0878000,0.0000000,0.0000000,-90.0000000); //
- Object[86] = CreateObject(5261,3764.5351600,-2589.3588900,12.5628600,0.0000000,0.0000000,3.3599700); //
- Object[87] = CreateObject(3816,3346.3647500,-2662.0190400,21.0290100,0.0000000,0.0000000,90.0600100); //
- Object[88] = CreateObject(3621,3438.7443800,-2696.6091300,17.7476900,356.8584000,0.0000000,3.1416000); //
- Object[89] = CreateObject(3621,3522.3774400,-2687.0668900,17.7477000,357.0000000,0.0000000,90.0000000); //
- Object[90] = CreateObject(3621,3457.2956500,-2695.5927700,17.7476900,356.8584000,0.0000000,3.1416000); //
- Object[91] = CreateObject(3621,3438.6762700,-2696.1345200,25.8441800,356.8584000,0.0000000,3.1416000); //
- Object[92] = CreateObject(3621,3521.9233400,-2687.2907700,25.8442000,356.8584000,0.0000000,90.0000000); //
- Object[93] = CreateObject(3707,3357.6616200,-2592.7539100,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[94] = CreateObject(3707,3358.6272000,-2565.9511700,20.4922000,0.0000000,0.0000000,2.0000000); //
- Object[95] = CreateObject(3707,3357.3938000,-2488.9873000,4.8878000,-180.0000000,0.0000000,0.0000000); //
- Object[96] = CreateObject(3707,3357.8801300,-2574.7795400,4.8878400,-180.0000000,0.0000000,0.0000000); //
- Object[97] = CreateObject(3707,3357.3754900,-2488.9792500,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[98] = CreateObject(3707,3387.6225600,-2428.7785600,20.4922000,0.0000000,0.0000000,-45.7200000); //
- Object[99] = CreateObject(3707,3437.1232900,-2380.5583500,20.4922000,0.0000000,0.0000000,-45.7200000); //
- Object[100] = CreateObject(3707,3477.5385700,-2341.1604000,20.4922000,0.0000000,0.0000000,-45.7200000); //
- Object[101] = CreateObject(3707,3544.9582500,-2314.7011700,20.4922000,0.0000000,0.0000000,-91.6200500); //
- Object[102] = CreateObject(3707,3614.2402300,-2316.5534700,20.4922000,0.0000000,0.0000000,-91.6200500); //
- Object[103] = CreateObject(3707,3683.7858900,-2318.8642600,20.4922000,0.0000000,0.0000000,-91.6200500); //
- Object[104] = CreateObject(3707,3753.0573700,-2320.8356900,20.4922000,0.0000000,0.0000000,-91.6200500); //
- Object[105] = CreateObject(3707,3822.3562000,-2322.9558100,20.4922000,0.0000000,0.0000000,-91.6200500); //
- Object[106] = CreateObject(3707,3829.8330100,-2349.4533700,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[107] = CreateObject(3707,3876.4514200,-2367.3608400,20.2438100,0.0000000,0.0000000,-90.0000000); //
- Object[108] = CreateObject(3707,3925.3911100,-2413.4064900,20.1695600,0.0000000,0.0000000,0.0000000); //
- Object[109] = CreateObject(3707,3925.3820800,-2482.6826200,20.1628200,0.0000000,0.0000000,0.0000000); //
- Object[110] = CreateObject(3707,3925.2959000,-2551.8068800,20.0767300,0.0000000,0.0000000,0.0000000); //
- Object[111] = CreateObject(3707,3877.1342800,-2601.4204100,20.4922000,0.0000000,0.0000000,-90.0000000); //
- Object[112] = CreateObject(3707,3826.8002900,-2636.5708000,20.4922000,0.0000000,0.0000000,-90.0000000); //
- Object[113] = CreateObject(3621,3453.9365200,-2695.1738300,25.8441800,356.8584000,0.0000000,3.1416000); //
- Object[114] = CreateObject(3623,3529.6022900,-2546.2253400,17.0703000,0.0000000,0.0000000,-90.3984000); //
- Object[115] = CreateObject(3623,3554.1171900,-2517.9404300,16.4453000,0.0000000,0.0000000,-90.0000000); //
- Object[116] = CreateObject(3707,3684.4741200,-2586.6044900,19.9766000,0.0000000,0.0000000,0.0000000); //
- Object[117] = CreateObject(3707,3684.4741200,-2586.6044900,4.7547900,180.0000000,0.0000000,0.0000000); //
- Object[118] = CreateObject(3865,3374.3928200,-2654.2736800,15.5797700,90.3600100,-533.9401900,0.0000000); //
- Object[119] = CreateObject(3865,3372.8686500,-2672.1044900,15.5797700,90.3600100,-533.9401900,0.0000000); //
- Object[120] = CreateObject(3865,3372.8686500,-2672.1044900,24.3796000,90.3600000,90.0000000,0.0000000); //
- Object[121] = CreateObject(3865,3374.3906300,-2654.0886200,24.3796000,90.3600000,90.0000000,0.0000000); //
- Object[122] = CreateObject(3865,3374.4804700,-2651.3752400,15.5797700,90.3600100,-533.9401900,0.0000000); //
- Object[123] = CreateObject(3865,3374.3403300,-2651.5703100,24.3796000,90.3600000,90.0000000,0.0000000); //
- Object[124] = CreateObject(3865,3372.9140600,-2669.9856000,15.5797700,90.3600100,-533.9401900,0.0000000); //
- Object[125] = CreateObject(3865,3373.1167000,-2669.9975600,24.3796000,90.3600000,90.0000000,0.0000000); //
- Object[126] = CreateObject(3707,3829.4118700,-2404.3139600,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[127] = CreateObject(3707,3828.8420400,-2508.4384800,20.4922000,0.0000000,0.0000000,0.0000000); //
- Object[128] = CreateObject(3707,3877.0756800,-2591.9287100,20.1335700,0.0000000,0.0000000,-90.0000000); //
- Object[129] = CreateObject(8661,3689.3894000,-2575.1833500,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[130] = CreateObject(3621,3761.0915500,-2622.0210000,14.8537400,0.0000000,0.0000000,-6.3000100); //
- Object[131] = CreateObject(3621,3761.0915500,-2622.0210000,22.0635400,0.0000000,0.0000000,-6.3000100); //
- Object[132] = CreateObject(8661,3729.1904300,-2595.6767600,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[133] = CreateObject(8661,3689.3623000,-2595.0466300,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[134] = CreateObject(8661,3689.3354500,-2614.9270000,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[135] = CreateObject(8661,3729.2087400,-2615.0554200,12.6523000,0.0000000,0.0000000,0.0000000); //
- Object[136] = CreateObject(3630,3727.3166500,-2612.1577100,14.0611000,0.0000000,0.0000000,-2.8200000); //
- Object[137] = CreateObject(3796,3703.3913600,-2602.4458000,12.6405700,0.0000000,0.0000000,-180.4197100); //
- Object[138] = CreateObject(5262,3763.9653300,-2595.8974600,15.2510500,0.0000000,0.0000000,0.0000000); //
- Object[139] = CreateObject(5259,3749.1171900,-2605.0444300,14.2753400,0.0000000,0.0000000,0.0000000); //
- Object[140] = CreateObject(5261,3764.7360800,-2603.9108900,12.5629000,0.0000000,0.0000000,-180.0000000); //
- Object[141] = CreateObject(11461,3713.7309600,-2588.7233900,9.8622800,0.0000000,0.0000000,0.0000000); //
- Object[142] = CreateObject(3006,3726.0210000,-2594.3715800,12.3416400,0.0000000,0.0000000,0.0000000); //
- Object[143] = CreateObject(3006,3727.5642100,-2594.4292000,12.3576900,0.0000000,0.0000000,0.0000000); //
- Object[144] = CreateObject(3006,3727.4433600,-2595.4802200,12.3576900,0.0000000,0.0000000,0.0000000); //
- Object[145] = CreateObject(3006,3726.0971700,-2595.6467300,12.3576900,0.0000000,0.0000000,0.0000000); //
- Object[146] = CreateObject(3257,3713.6247600,-2611.8178700,12.6394000,0.0000000,0.0000000,87.3597900); //
- Object[147] = CreateObject(2991,3721.8820800,-2601.1171900,13.2067800,0.0000000,0.0000000,0.0000000); //
- Object[148] = CreateObject(2991,3721.8820800,-2601.1171900,14.4329200,0.0000000,0.0000000,0.0000000); //
- Object[149] = CreateObject(2991,3721.8820800,-2601.1171900,15.6723500,0.0000000,0.0000000,0.0000000); //
- Object[150] = CreateObject(2991,3721.8820800,-2601.1171900,16.8695400,0.0000000,0.0000000,0.0000000); //
- Object[151] = CreateObject(5261,3786.9660600,-2617.7946800,14.2583700,0.0000000,0.0000000,-184.6200100); //
- Object[152] = CreateObject(5261,3787.1779800,-2615.1821300,14.6689100,0.0000000,0.0000000,-184.6200100); //
- Object[153] = CreateObject(5261,3792.1010700,-2609.3178700,14.7218000,0.0000000,0.0000000,-91.9800200); //
- Object[154] = CreateObject(5261,3780.1308600,-2589.9606900,16.1400000,0.0000000,0.0000000,2.9999800); //
- Object[155] = CreateObject(8558,3783.3313000,-2607.3664600,18.4411900,0.0000000,0.0000000,90.0000000); //
- Object[156] = CreateObject(14410,3778.9106400,-2603.5273400,16.7686300,0.0000000,0.0000000,-90.0000400); //
- Object[157] = CreateObject(1636,3789.1550300,-2610.8840300,20.4355000,-98.8800000,15.6000000,0.0000000); //
- Object[158] = CreateObject(5261,3768.8933100,-2614.3933100,12.5628600,0.0000000,0.0000000,-267.1199300); //
- Object[159] = CreateObject(14410,3770.3305700,-2603.5219700,10.8517100,0.0000000,0.0000000,-90.0000400); //
- Object[160] = CreateObject(3621,3522.4021000,-2626.2104500,17.9774600,356.8584000,0.0000000,90.0000000); //
- Object[161] = CreateObject(3621,3521.9650900,-2626.2299800,25.6183800,356.8584000,0.0000000,90.0000000); //
- Object[162] = CreateObject(967,3747.8383800,-2581.8996600,12.4858700,0.0000000,0.0000000,-178.3799900); //
- Object[163] = CreateObject(3798,3762.7580600,-2570.7263200,12.6645400,0.0000000,0.0000000,0.0000000); //
- Object[164] = CreateObject(3798,3760.7268100,-2570.6901900,12.6645400,0.0000000,0.0000000,0.0000000); //
- Object[165] = CreateObject(3798,3762.0144000,-2571.8366700,14.6420500,0.0000000,0.0000000,0.0000000); //
- Object[166] = CreateObject(3798,3760.7368200,-2572.6779800,12.6645400,0.0000000,0.0000000,0.0000000); //
- Object[167] = CreateObject(3798,3762.7592800,-2572.8149400,12.6645400,0.0000000,0.0000000,0.0000000); //
- Object[168] = CreateObject(5145,3751.0368700,-2656.4704600,2.1949000,0.0000000,0.0000000,-268.7996500); //
- Object[169] = CreateObject(7040,3835.5041500,-2577.8193400,15.9503000,0.0000000,0.0000000,0.0000000); //
- Object[170] = CreateObject(3574,3789.2011700,-2520.5175800,15.2188000,0.0000000,0.0000000,0.0000000); //
- Object[171] = CreateObject(3574,3879.4736300,-2411.9350600,15.2188000,0.0000000,0.0000000,0.0000000); //
- Object[172] = CreateObject(3577,3878.7360800,-2428.6296400,13.1169200,0.0000000,0.0000000,0.0000000); //
- Object[173] = CreateObject(3575,3861.9069800,-2428.7522000,15.2188000,0.0000000,0.0000000,0.0000000); //
- AddStaticVehicle(521,3384.4421000,-2667.1631000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.8887000,-2667.1934000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3377.0190000,-2667.1653000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3388.0735000,-2667.1216000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.9580000,-2665.9985000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.9636000,-2664.8870000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.8591000,-2663.7292000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.6470000,-2662.6677000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.5952000,-2661.6235000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.4578000,-2660.6016000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3387.1477000,-2659.3499000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3384.3320000,-2666.0806000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3384.4746000,-2665.0103000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3384.1409000,-2663.7778000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3383.9541000,-2662.6118000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3383.5896000,-2661.4126000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3383.3999000,-2660.3921000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3383.2559000,-2659.1563000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.8193000,-2666.2534000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.7866000,-2665.1565000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.4890000,-2663.9587000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.5178000,-2662.5906000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3380.2295000,-2661.4363000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3379.8689000,-2660.2446000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3379.5884000,-2658.9697000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.9045000,-2658.9192000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.6599000,-2660.2383000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.8569000,-2661.5154000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.9841000,-2662.6531000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.8110000,-2664.1116000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3375.8628000,-2665.3958000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(521,3376.6118000,-2666.3276000,12.9390000,-88.8600000,-1,-1); //FCR-900
- AddStaticVehicle(476,3355.7896000,-2663.7864000,14.1494000,-88.5600000,-1,-1); //Rustler
- AddStaticVehicle(470,3865.6577000,-2539.2683000,13.1038000,89.4000000,-1,-1); //Patriot
- AddStaticVehicle(470,3865.7749000,-2534.1084000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3865.7607000,-2529.2161000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3866.0300000,-2523.8647000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3866.1494000,-2518.7874000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3866.3347000,-2513.2944000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3866.5093000,-2508.2632000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3867.0020000,-2502.3264000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3867.0796000,-2496.3232000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3867.8086000,-2489.9839000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3868.0986000,-2483.7104000,13.1038000,91.3800000,-1,-1); //Patriot
- AddStaticVehicle(470,3868.9934000,-2476.6555000,13.1038000,91.3800000,-1,-1); //Patriot
- }
- #endif
- //==============================================================================
- // Basic vars
- //==============================================================================
- new bool:MissionStarted;
- new bool:ObjectiveStarted;
- new bool:MissionCancelled;
- new bool:ObjectivePlaced;
- native IsValidVehicle(vehicleid);
- enum obj
- {
- ObjectiveName[30],
- BeingPlaced,
- ObjectiveTimer,
- ProgressTimer,
- ProgressCount,
- Count
- };
- enum teamdata
- {
- Name[32],
- Members,
- Kills
- };
- enum playerdata
- {
- UserName[MAX_PLAYER_NAME],
- bool:TeamChosen,
- TeamSelection,
- PlayerClassID
- };
- new Team[2][teamdata];
- new PlayerMissionInfo[MAX_PLAYERS][playerdata];
- new ObjectiveInfo[obj];
- new MaxExplosions;
- new FlashTimer;
- //==============================================================================
- // Basic script
- //==============================================================================
- main()
- {
- print("----------------------------------");
- print(" Mission: "MISSION_NAME" started.");
- print("----------------------------------\n");
- }
- public OnGameModeInit()
- {
- MissionStarted= true;
- format(Team[TEAM_DEFEND][Name],32,"%s",TEAM_DEFEND_NAME);
- format(Team[TEAM_ATTACK][Name],32,"%s",TEAM_ATTACK_NAME);
- format(ObjectiveInfo[ObjectiveName],sizeof(ObjectiveInfo[ObjectiveName]),"%s",OBJ_NAME);
- CallRemoteFunction("CreateBombingTD","d",PLACING_TIME*10);
- MaxExplosions= sizeof(ExplosionsInfo);
- ObjectivePlaced= false;
- ObjectiveInfo[BeingPlaced]=-1;
- #if MAX_MAP_OBJECTS != 0
- CreateMap();
- #endif
- for(new i=0; i<sizeof(SkinData); i++)
- {
- AddPlayerClassEx(SkinData[i][TeamID],SkinData[i][SkinID],SkinData[i][SpawnX],SkinData[i][SpawnY],SkinData[i][SpawnZ],SkinData[i][SpawnAngle],0,0,0,0,0,0);
- }
- for(new i=0; i<MAX_PLAYERS; i++) PlayerMissionInfo[i][TeamSelection]= NO_TEAM;
- for(new i=0; i<MAX_VEHICLES; i++) if(IsValidVehicle(i)) SetVehicleHealth(i,VEHICLE_HEALTH);
- if(CallRemoteFunction("GetCurrentMissionCJWalk","")) UsePlayerPedAnims();
- SetTimer("StartMissionFunc",3000,false);
- return 1;
- }
- FUNCTION StartMissionFunc()
- {
- CallRemoteFunction("StartMission","");
- ObjectiveStarted= true;
- return 1;
- }
- public OnGameModeExit()
- {
- #if MAX_MAP_OBJECTS != 0
- for(new i=0;i<MAX_MAP_OBJECTS;i++) DestroyObject(Object[i]);
- #endif
- for(new i=0; i<MAX_VEHICLES; i++)
- {
- DestroyVehicle(i);
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid)
- {
- if(PlayerMissionInfo[playerid][TeamChosen])
- {
- Team[PlayerMissionInfo[playerid][TeamSelection]][Members] --;
- PlayerMissionInfo[playerid][TeamChosen]=false;
- }
- return 1;
- }
- public OnPlayerRequestClass(playerid,classid)
- {
- SetPlayerPos(playerid,CLASS_POSTION);
- SetPlayerCameraPos(playerid,CLASS_CAMERA);
- SetPlayerCameraLookAt(playerid,CLASS_POSTION);
- SetPlayerFacingAngle(playerid,CLASS_FACING_AGNLE);
- CallRemoteFunction("ShowClassSelection","iisiii",playerid, SkinData[classid][TeamID],Team[SkinData[classid][TeamID]][Name], SkinData[classid][Weapon1], SkinData[classid][Weapon2], SkinData[classid][Weapon3]);
- if(PlayerMissionInfo[playerid][TeamChosen])
- {
- PlayerMissionInfo[playerid][TeamChosen] = false;
- Team[PlayerMissionInfo[playerid][TeamSelection]][Members]--;
- }
- PlayerMissionInfo[playerid][TeamSelection] = SkinData[classid][TeamID];
- PlayerMissionInfo[playerid][PlayerClassID]=classid;
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- new opp_team = (PlayerMissionInfo[playerid][TeamSelection] == 1)? 0:1;
- if(Team[PlayerMissionInfo[playerid][TeamSelection]][Members] > Team[opp_team][Members])
- {
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, "This Team is full, choose another!",0);
- return 0;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- new string[124];
- CallRemoteFunction("UpdateAliveState","ii",playerid,1);
- if(CallRemoteFunction("GetSpectateStatus","d",playerid)) return CallRemoteFunction("SpecOffAdmin","d",playerid);
- if(CallRemoteFunction("GetJailedStatus","d",playerid)) CallRemoteFunction("SetJailed","d",playerid);
- else
- {
- SetPlayerPos(playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][SpawnX],SkinData[PlayerMissionInfo[playerid][PlayerClassID]][SpawnY],SkinData[PlayerMissionInfo[playerid][PlayerClassID]][SpawnZ]);
- SetPlayerInterior(playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][SpawnInterior]);
- SetPlayerFacingAngle(playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][SpawnAngle]);
- SetPlayerVirtualWorld(playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][VirtualWorld]);
- if(!PlayerMissionInfo[playerid][TeamChosen])
- {
- Team[PlayerMissionInfo[playerid][TeamSelection]][Members]++;
- PlayerMissionInfo[playerid][TeamChosen] = true;
- if(PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK)
- {
- format(string,sizeof(string),"You are a %s, your mission is to destroy the %s.",Team[TEAM_ATTACK][Name],ObjectiveInfo[ObjectiveName]);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1,string,2000);
- format(string,sizeof(string),"%s will try to stop you, eliminate them!.",Team[TEAM_DEFEND][Name]);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, string,4000);
- format(string,sizeof(string),"Destroy the ~y~%s~w~!",ObjectiveInfo[ObjectiveName]);
- CallRemoteFunction("ShowInfoText", "iisi", playerid, -1, string,1000);
- }
- else
- {
- format(string,sizeof(string),"You are a %s, your mission is to protect the %s from %s.",Team[TEAM_DEFEND][Name],ObjectiveInfo[ObjectiveName],Team[TEAM_ATTACK][Name]);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1,string,2000);
- format(string,sizeof(string),"Protect the ~y~%s~w~!.",ObjectiveInfo[ObjectiveName]);
- CallRemoteFunction("ShowInfoText", "iisi", playerid, -1, string,1000);
- }
- }
- CallRemoteFunction("GivePlayerWeaponEx","ddd",playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Weapon1],SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Ammo1]);
- CallRemoteFunction("GivePlayerWeaponEx","ddd",playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Weapon2],SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Ammo2]);
- CallRemoteFunction("GivePlayerWeaponEx","ddd",playerid,SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Weapon3],SkinData[PlayerMissionInfo[playerid][PlayerClassID]][Ammo3]);
- }
- SetPlayerTeam(playerid,PlayerMissionInfo[playerid][TeamSelection]);
- if(PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK) SetPlayerColor(playerid,COLOR_TEAM_ATTACK);
- else SetPlayerColor(playerid,COLOR_TEAM_DEFEND);
- SetPlayerHealth(playerid,Health);
- #if SPAWN_PROTECTION == true
- CallRemoteFunction("SetSpawnProtection","df",playerid,Health);
- #endif
- CallRemoteFunction("OnPlayerBombingData", "ii", playerid, 1);
- SetPlayerCheckpoint(playerid,CP_POS,CP_SIZE);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[128];
- if(killerid != INVALID_PLAYER_ID)
- {
- SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
- Team[PlayerMissionInfo[killerid][TeamSelection]][Kills]++;
- }
- if(PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK)
- {
- if(!ObjectivePlaced && ObjectiveInfo[BeingPlaced] == playerid)
- {
- ObjectiveInfo[BeingPlaced]=-1;
- format(string,sizeof(string),"~y~%s ~w~has died while ~r~~h~planting~w~ the bomb.",PlayerMissionInfo[playerid][UserName]);
- CallRemoteFunction("ShowInfoText", "iisi", -1, playerid, string, 0);
- ObjectiveInfo[Count]=0;
- KillTimer(ObjectiveInfo[ObjectiveTimer]);
- ObjectiveInfo[ProgressCount]=0;
- KillTimer(ObjectiveInfo[ProgressTimer]);
- CallRemoteFunction("UpdateBombProgressBar", "d", 0);
- }
- }
- CallRemoteFunction("UpdateAliveState","ii",playerid,0);
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(!MissionStarted || ObjectivePlaced) return 1;
- new string[128];
- if(PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK && !ObjectivePlaced)
- {
- if(ObjectiveInfo[BeingPlaced] != -1)
- {
- format(string,sizeof(string),"%s is already trying to place the bomb. Please wait!",PlayerMissionInfo[ObjectiveInfo[BeingPlaced]][UserName]);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, string, 0);
- }
- else
- {
- ObjectiveInfo[BeingPlaced]=playerid;
- format(string,sizeof(string),"~y~%s~w~ is placing the bomb..!!",PlayerMissionInfo[playerid][UserName],playerid);
- CallRemoteFunction("ShowInfoText", "iisi", -1, playerid, string, 0);
- format(string,sizeof(string),"Wait in the checkpoint for %d seconds to place the bomb.",PLACING_TIME);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, string, 0);
- ObjectiveInfo[Count]=0;
- ObjectiveInfo[ProgressCount]=0;
- CallRemoteFunction("UpdateBombProgressBar", "d", 0);
- ObjectiveInfo[ObjectiveTimer] = SetTimer("PlacingTimer",1000,true);
- ObjectiveInfo[ProgressTimer] = SetTimer("ProgressFillUP",100,true);
- }
- }
- else
- {
- if(ObjectiveInfo[BeingPlaced] != -1)
- {
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, "This is bomb placing sight, protect it.", 0);
- }
- else
- {
- format(string,sizeof(string),"%s is trying to place the bomb. Stop them!",PlayerMissionInfo[ObjectiveInfo[BeingPlaced]][UserName]);
- CallRemoteFunction("ShowInfoBox", "iisi", playerid, -1, string, 0);
- }
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- if(!MissionStarted || ObjectivePlaced) return 1;
- new string[128];
- if(PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK && !ObjectivePlaced && ObjectiveInfo[BeingPlaced] == playerid)
- {
- ObjectiveInfo[BeingPlaced]=-1;
- format(string,sizeof(string),"~y~%s~w~ has left ~r~~h~planting~w~ the bomb.",PlayerMissionInfo[playerid][UserName],playerid);
- CallRemoteFunction("ShowInfoText", "iisi", -1, playerid, string, 0);
- ObjectiveInfo[Count]=0;
- KillTimer(ObjectiveInfo[ObjectiveTimer]);
- ObjectiveInfo[ProgressCount]=0;
- KillTimer(ObjectiveInfo[ProgressTimer]);
- CallRemoteFunction("UpdateBombProgressBar", "d", 0);
- }
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- SetVehicleHealth(vehicleid,VEHICLE_HEALTH);
- return 1;
- }
- FUNCTION EndTheMission()
- {
- if(!MissionStarted) return 1;
- MissionStarted= false;
- if(!MissionCancelled)
- {
- new string[256];
- new amount= 10000;
- if(!ObjectivePlaced)
- {
- amount+=Team[TEAM_DEFEND][Kills]*100;
- format(string,sizeof(string),""SERVER_KEY_MSG" %s has won the mission, by successfully defending the %s. Reward: $%d",Team[TEAM_DEFEND][Name],ObjectiveInfo[ObjectiveName],amount);
- SendClientMessageToAll(COLOR_SERVER,string);
- CallRemoteFunction("IRC_SendMessage","ss",string,IRC_SERVER_COLOR);
- format(string,sizeof(string),""SERVER_KEY_MSG" You have received $%i because your team has won the mission!",amount);
- for(new i=0,j=GetPlayerPoolSize(); i <= j; i++)
- {
- if(!PlayerMissionInfo[i][TeamChosen]) continue;
- if(PlayerMissionInfo[i][TeamSelection] == TEAM_DEFEND)
- {
- PlayerPlaySound(i,3200,0,0,0);
- SendClientMessage(i,COLOR_TEAM_DEFEND,string);
- CallRemoteFunction("GivePlayerCash","ii",i,amount);
- CallRemoteFunction("PlayerMissionStats","dd",i,0);
- }
- if(PlayerMissionInfo[i][TeamSelection] != TEAM_DEFEND)
- {
- PlayerPlaySound(i,17004,0,0,0);
- GameTextForPlayer(i,"~R~MISSION FAILED~w~!",3000,3);
- CallRemoteFunction("PlayerMissionStats","dd",i,1);
- }
- }
- }
- else
- {
- amount+=Team[TEAM_ATTACK][Kills]*100;
- format(string,sizeof(string),""SERVER_KEY_MSG" %s (%d) placed the bomb to destroy %s's %s. %s's has won the mission. Reward: 1 Token.",PlayerMissionInfo[ObjectiveInfo[BeingPlaced]][UserName],ObjectiveInfo[BeingPlaced],Team[TEAM_DEFEND][Name],ObjectiveInfo[ObjectiveName]);
- SendClientMessageToAll(COLOR_SERVER,string);
- format(string,sizeof(string),""SERVER_KEY_MSG" %s have won the mission. Reward: $%d.",Team[TEAM_ATTACK][Name],amount);
- SendClientMessageToAll(COLOR_SERVER,string);
- CallRemoteFunction("IRC_SendMessage","ss",string,IRC_SERVER_COLOR);
- CallRemoteFunction("PlayerMissionStats","dd",ObjectiveInfo[BeingPlaced],8);
- CallRemoteFunction("GivePlayerToken","dd",ObjectiveInfo[BeingPlaced],1);
- format(string,sizeof(string),""SERVER_KEY_MSG" You have received $%i because your team has won the Team-Deathmatch!",amount);
- for(new i=0,j=GetPlayerPoolSize(); i <= j; i++)
- {
- if(!PlayerMissionInfo[i][TeamChosen]) continue;
- if(PlayerMissionInfo[i][TeamSelection] == TEAM_ATTACK)
- {
- PlayerPlaySound(i,3200,0,0,0);
- SendClientMessage(i,COLOR_TEAM_ATTACK,string);
- CallRemoteFunction("GivePlayerCash","ii",i,amount);
- CallRemoteFunction("PlayerMissionStats","dd",i,0);
- }
- if(PlayerMissionInfo[i][TeamSelection] != TEAM_ATTACK)
- {
- PlayerPlaySound(i,17004,0,0,0);
- GameTextForPlayer(i,"~R~MISSION FAILED~w~!",3000,3);
- CallRemoteFunction("PlayerMissionStats","dd",i,1);
- }
- }
- }
- }
- else
- {
- PlaySoundForAll(1058);
- SendClientMessageToAll(COLOR_SERVER,""SERVER_KEY_MSG" The mission has been cancelled.");
- CallRemoteFunction("IRC_SendMessage","ss",""SERVER_KEY_MSG" The mission has been cancelled.",IRC_SERVER_COLOR);
- CallRemoteFunction("ShowInfoBox", "iisi", -1, -1,"The mission has been cancelled.",0);
- GameTextForAll("~R~MISSION CANCELLED~w~!",3000,3);
- }
- return 1;
- }
- //==============================================================================
- // Mission functions
- //==============================================================================
- FUNCTION ProgressFillUP()
- {
- ObjectiveInfo[ProgressCount]++;
- CallRemoteFunction("UpdateBombProgressBar", "d", ObjectiveInfo[ProgressCount]);
- }
- FUNCTION PlacingTimer()
- {
- if(!MissionStarted || ObjectivePlaced) return 1;
- if(ObjectiveInfo[BeingPlaced] == -1)
- {
- ObjectiveInfo[Count]=0;
- ObjectiveInfo[ProgressCount]=0;
- KillTimer(ObjectiveInfo[ObjectiveTimer]);
- KillTimer(ObjectiveInfo[ProgressTimer]);
- }
- ObjectiveInfo[Count]++;
- if(ObjectiveInfo[Count] == PLACING_TIME)
- {
- ObjectivePlaced=true;
- new string[128],id=ObjectiveInfo[BeingPlaced];
- format(string,sizeof(string),""SERVER_KEY_MSG" %s (%d) has successfully planted the bomb, 15 seconds before the bomb explodes.",PlayerMissionInfo[id][UserName],id);
- SendClientMessageToAll(COLOR_SERVER,string);
- SetTimerEx("Explosion",15000,false,"ii",0,5);
- KillTimer(ObjectiveInfo[ObjectiveTimer]);
- KillTimer(ObjectiveInfo[ProgressTimer]);
- FlashTimer= SetTimer("FlasBomb",500,true);
- CallRemoteFunction("FlashBombBar", "");
- CallRemoteFunction("UpdateBombInfo", "");
- CallRemoteFunction("KillGameModeTimer","");
- CallRemoteFunction("TD_Clock","s","_");
- DisableCheckpointForAll();
- }
- return 1;
- }
- FUNCTION FlasBomb()
- {
- CallRemoteFunction("FlashBombBar", "");
- return 1;
- }
- FUNCTION Explosion(start, until)
- {
- for(new i = start; i < until; i++)
- {
- if(i >= MaxExplosions) break;
- CreateExplosion(ExplosionsInfo[i][0], ExplosionsInfo[i][1], ExplosionsInfo[i][2] , 7, 20.0);
- }
- start += 5;
- until += 5;
- if(until > MaxExplosions)
- {
- CallRemoteFunction("EndMission","");
- KillTimer(FlashTimer);
- }
- else
- {
- SetTimerEx("Explosion", 1000, false, "ii", start, until);
- }
- return 1;
- }
- DisableCheckpointForAll()
- {
- for(new i=0,j=GetPlayerPoolSize(); i <=j ; i++)
- {
- if(!IsPlayerConnected(i)) continue;
- DisablePlayerCheckpoint(i);
- }
- }
- PlaySoundForAll(sound)
- {
- for(new i=0,j=GetPlayerPoolSize(); i <=j ; i++)
- {
- if(IsPlayerConnected(i)) PlayerPlaySound(i,sound,0,0,0);
- }
- }
- //==============================================================================
- // Important functions required
- //==============================================================================
- FUNCTION OnPlayerNameRecieve(playerid,name[])
- {
- format(PlayerMissionInfo[playerid][UserName],MAX_PLAYER_NAME,"%s",name);
- return 1;
- }
- FUNCTION CancelTheMission()
- {
- MissionCancelled= true;
- return 1;
- }
- FUNCTION MissionObjectiveStarted() return ObjectiveStarted;
- FUNCTION OnPlayerSpectateObjective(playerid)
- {
- SetPlayerCameraPos(playerid, CP_POS + 2.5);
- SetPlayerCameraLookAt(playerid, CP_POS);
- SetPlayerPos(playerid, CP_POS - 5);
- SetPlayerColor(playerid, (PlayerMissionInfo[playerid][TeamSelection] == TEAM_ATTACK) ? COLOR_TEAM_ATTACK_INV : COLOR_TEAM_DEFEND_INV);
- return 1;
- }
Add Comment
Please, Sign In to add comment