#1

this is my GM :
pawn Код:
#include <a_samp>
#include <zcmd>
new MapChange;
#include <JunkBuster>
#include <core>
#include <float>
#include <colors>
#include <foreach>
///////COLOURES////////////////
#define COLOR_GREEN 0x33AA33AA //Vert FOncй
#define COLOR_RED 0xAA3333AA// Rouge FOncй
#define COLOR_YELLOW 0xFFFF00AA// JAUNE//
#define lightred     0xFB0000AA// Rouge claire
#define COLOR_GOLD 0xFFD700FF// ORS
#define COLOR_LIME 0x00FF00FF// Vert claire
#define COLOR_SILVER 0xC0C0C0FF // Fida
////////////////TEAMS///////////
static gTeam[MAX_PLAYERS];
#define TEAM_SWAT 1
#define TEAM_TERRORIST 2
forward StartedNewRound(); // On top of your script.
forward NewMapTimer(playerid); //
main()
{
    print("\n----------------------------------");
    print(" Swat 5 TDM");
    print("----------------------------------\n");
}

public OnGameModeInit()
{
SetTimer("NewMapTimer",60000,true); // this is 2 min timer for MapChangechange basically has to be on true for it to change the other MapChangewhen timer is over OnPlayerSpawn Further in the tutorial you will know why
MapChange= 0;
SetTimer("AnnounceMSG", 120000, true);
ShowPlayerMarkers(0);
ShowNameTags(1);
SetNameTagDrawDistance(20);
SetWeather(10);
SetWorldTime(0);
UsePlayerPedAnims();
LimitGlobalChatRadius(20);
////////////////////////////TEAMS///////////
AddPlayerClass(285,-4198.6240,395.5814,26.1159,18.4021,0,0,0,0,0,0);//SWAT//
AddPlayerClass(272,-4253.7134,463.4392,29.7993,359.6018,0,0,0,0,0,0);//TERRORIST//
/////////////////////////////////////////////////////////////////////
//===============================ROUND1=============================//
CreateObject(4244,-4114.34375000,486.39776611,9.10244370,4.00000000,0.00000000,92.00000000); //object(sbsbed9law2) (2)
CreateObject(4244,-4200.74414062,484.44348145,15.26560593,3.99902344,0.00000000,91.99951172); //object(sbsbed9law2) (4)
CreateObject(4244,-4204.63769531,355.33190918,-70.41440582,65.68743896,9.75460815,353.09545898); //object(sbsbed9law2) (5)
CreateObject(17026,-4073.84667969,390.33135986,-1.25000000,0.00000000,0.00000000,235.99732971); //object(cunt_rockgp2_) (15)
CreateObject(9237,-4129.55468750,580.62811279,27.17902374,0.00000000,0.00000000,60.00000000); //object(lighhouse_sfn) (1)
CreateObject(9237,-4176.64453125,577.27276611,31.08481216,0.00000000,0.00000000,107.99853516); //object(lighhouse_sfn) (2)
CreateObject(9237,-4224.02734375,575.52374268,34.43722153,0.00000000,0.00000000,95.99853516); //object(lighhouse_sfn) (4)
CreateObject(9237,-4297.26367188,575.10992432,39.55506516,0.00000000,0.00000000,95.99853516); //object(lighhouse_sfn) (5)
CreateObject(9237,-4297.13671875,528.98431396,39.61418152,0.00000000,0.00000000,177.99853516); //object(lighhouse_sfn) (6)
CreateObject(9237,-4295.80957031,481.96194458,39.61898041,0.00000000,0.00000000,177.99499512); //object(lighhouse_sfn) (7)
CreateObject(7191,-4298.95556641,552.03228760,33.68464279,0.00000000,0.00000000,1.25000000); //object(vegasnnewfence2b) (1)
CreateObject(7191,-4298.93896484,552.02447510,37.37439728,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (2)
CreateObject(7191,-4297.90673828,504.76324463,33.76081848,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (3)
CreateObject(7191,-4297.90820312,504.77914429,37.26612854,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (4)
CreateObject(7191,-4295.83251953,461.35494995,33.72172546,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (5)
CreateObject(7191,-4295.85546875,461.35974121,37.14049530,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (6)
CreateObject(9237,-4293.69042969,438.29455566,39.63910675,0.00000000,0.00000000,177.99499512); //object(lighhouse_sfn) (8)
CreateObject(7191,-4294.00634766,414.00466919,33.69598389,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (7)
CreateObject(7191,-4294.02343750,414.01129150,36.77317047,0.00000000,0.00000000,1.24694824); //object(vegasnnewfence2b) (8)
CreateObject(9237,-4292.81884766,389.83212280,39.48573303,0.00000000,0.00000000,198.49499512); //object(lighhouse_sfn) (9)
CreateObject(7191,-4270.35009766,386.83505249,32.41366959,4.00000000,0.00000000,87.99694824); //object(vegasnnewfence2b) (9)
CreateObject(7191,-4270.20556641,386.78256226,35.59782791,3.99902344,0.00000000,87.99499512); //object(vegasnnewfence2b) (10)
CreateObject(9237,-4246.63720703,387.46945190,36.23650360,0.00000000,0.00000000,266.48999023); //object(lighhouse_sfn) (10)
CreateObject(7191,-4222.82177734,388.31286621,29.06631088,3.99902344,0.00000000,93.99499512); //object(vegasnnewfence2b) (11)
CreateObject(7191,-4222.59423828,388.30703735,32.52218246,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (12)
CreateObject(9237,-4198.87402344,391.10482788,33.12967300,0.00000000,0.00000000,266.48986816); //object(lighhouse_sfn) (12)
CreateObject(7191,-4175.55761719,391.78115845,25.26479912,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (13)
CreateObject(7191,-4175.33837891,391.71109009,28.24444771,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (14)
CreateObject(7191,-4133.06005859,394.52655029,22.39091682,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (15)
CreateObject(7191,-4132.83935547,394.44537354,25.40160751,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (16)
CreateObject(9237,-4153.93847656,393.09429932,30.01132584,0.00000000,0.00000000,266.48986816); //object(lighhouse_sfn) (13)
CreateObject(9237,-4111.32226562,395.62997437,26.78554153,0.00000000,0.00000000,315.73986816); //object(lighhouse_sfn) (14)
CreateObject(7191,-4113.14404297,418.10211182,20.41083527,0.00000000,0.00000000,185.99353027); //object(vegasnnewfence2b) (17)
CreateObject(7191,-4113.09570312,418.03598022,23.62196350,0.00000000,0.00000000,185.99304199); //object(vegasnnewfence2b) (18)
CreateObject(9237,-4116.40673828,442.12597656,26.62172318,0.00000000,0.00000000,7.73608398); //object(lighhouse_sfn) (15)
CreateObject(7191,-4126.10156250,556.55261230,20.95818329,0.00000000,0.00000000,185.99304199); //object(vegasnnewfence2b) (19)
CreateObject(7191,-4126.10791016,556.59069824,24.59521294,0.00000000,0.00000000,185.99304199); //object(vegasnnewfence2b) (20)
CreateObject(9237,-4125.05810547,533.34130859,27.40213776,0.00000000,0.00000000,7.73437500); //object(lighhouse_sfn) (16)
CreateObject(3749,-4120.38964844,492.76406860,28.75624084,0.00000000,0.00000000,96.00000000); //object(clubgate01_lax) (1)
CreateObject(3749,-4120.40087891,492.81872559,17.72132111,0.00000000,179.99993896,95.99853516); //object(clubgate01_lax) (2)
CreateObject(7191,-4117.96386719,461.53286743,21.17155647,0.00000000,0.00000000,185.99304199); //object(vegasnnewfence2b) (21)
CreateObject(7191,-4117.93066406,461.54885864,24.00608063,0.00000000,0.00000000,185.99304199); //object(vegasnnewfence2b) (22)
CreateObject(7191,-4122.79052734,524.59906006,21.35580826,0.00000000,0.00000000,5.99304199); //object(vegasnnewfence2b) (23)
CreateObject(7191,-4122.77636719,524.56396484,24.57059097,0.00000000,0.00000000,5.99304199); //object(vegasnnewfence2b) (24)
CreateObject(11496,-4060.05297852,495.40957642,3.47338915,0.00000000,0.00000000,92.00000000); //object(des_wjetty) (3)
CreateObject(11496,-4060.00878906,491.90011597,3.44939756,0.00000000,0.00000000,271.99951172); //object(des_wjetty) (4)
CreateObject(11496,-4045.51513672,495.98541260,3.48426723,0.00000000,0.00000000,91.99951172); //object(des_wjetty) (5)
CreateObject(11496,-4045.39477539,492.48141479,3.45672131,0.00000000,0.00000000,271.99951172); //object(des_wjetty) (6)
CreateObject(7191,-4153.96191406,580.35577393,23.39816284,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (28)
CreateObject(7191,-4153.74267578,580.37133789,25.51540184,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (29)
CreateObject(7191,-4201.12060547,576.81085205,26.70243645,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (30)
CreateObject(7191,-4200.94824219,576.84887695,29.43124390,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (31)
CreateObject(7191,-4248.21728516,574.02191162,30.12020111,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (32)
CreateObject(7191,-4247.92578125,574.11108398,32.80749893,3.99353027,0.00000000,93.99353027); //object(vegasnnewfence2b) (33)
CreateObject(9237,-4254.86816406,573.66058350,36.59653091,0.00000000,0.00000000,95.99853516); //object(lighhouse_sfn) (17)
CreateObject(7191,-4278.26562500,575.02484131,32.20026398,3.99353027,0.00000000,87.99353027); //object(vegasnnewfence2b) (34)
CreateObject(7191,-4276.45507812,574.99572754,35.20182037,3.98803711,0.00000000,87.98950195); //object(vegasnnewfence2b) (36)
CreateObject(4244,-4212.23876953,614.29785156,-69.57998657,65.68670654,350.24145508,190.65257263); //object(sbsbed9law2) (6)
CreateObject(17026,-4111.66796875,585.21557617,-1.00000000,0.00000000,0.00000000,61.99731445); //object(cunt_rockgp2_) (16)
CreateObject(17026,-4085.79296875,586.60174561,-7.19753265,0.00000000,0.00000000,49.99584961); //object(cunt_rockgp2_) (17)
CreateObject(17026,-4192.79003906,582.69989014,-2.17598724,0.00000000,0.00000000,61.99584961); //object(cunt_rockgp2_) (18)
CreateObject(17026,-4270.29687500,579.33020020,-3.62868881,0.00000000,0.00000000,61.99584961); //object(cunt_rockgp2_) (19)
CreateObject(616,-4285.59375000,582.39160156,16.89363480,0.00000000,0.00000000,0.00000000); //object(veg_treea1) (1)
CreateObject(621,-4273.03076172,587.84558105,3.43504333,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (1)
CreateObject(621,-4289.01220703,589.69104004,5.07587814,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (2)
CreateObject(621,-4228.79052734,586.28491211,12.94420624,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (3)
CreateObject(621,-4249.25195312,581.51678467,23.12009048,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (4)
CreateObject(621,-4200.67675781,585.75329590,10.30859375,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (5)
CreateObject(621,-4146.36425781,585.92694092,8.72344208,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (6)
CreateObject(621,-4155.85693359,586.18847656,7.58498383,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (7)
CreateObject(11427,-4257.29638672,473.55657959,35.56513977,0.00000000,0.00000000,182.00000000); //object(des_adobech) (1)
CreateObject(11440,-4257.49609375,455.08184814,27.77442551,0.00000000,0.00000000,0.00000000); //object(des_pueblo1) (1)
CreateObject(11440,-4255.99072266,484.89596558,27.48165321,0.00000000,0.00000000,90.00000000); //object(des_pueblo1) (2)
CreateObject(11444,-4243.91308594,450.36819458,27.86235809,0.00000000,0.00000000,0.00000000); //object(des_pueblo2) (1)
CreateObject(11444,-4236.72753906,451.68041992,27.64120102,0.00000000,2.00000000,0.00000000); //object(des_pueblo2) (2)
CreateObject(11444,-4232.25634766,451.59634399,27.32903481,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (3)
CreateObject(11444,-4227.87695312,451.60870361,27.02302933,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (4)
CreateObject(11444,-4232.11962891,450.22592163,30.18538094,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (5)
CreateObject(11444,-4232.18261719,442.61648560,27.34525681,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (6)
CreateObject(11445,-4221.32763672,453.15499878,25.81164932,0.00000000,0.00000000,0.00000000); //object(des_pueblo06) (1)
CreateObject(11447,-4222.10351562,448.80523682,26.33459473,358.00122070,2.00122070,278.06982422); //object(des_pueblo08) (1)
CreateObject(11447,-4213.46240234,456.48297119,26.00511932,358.00048828,1.99951172,316.06945801); //object(des_pueblo08) (2)
CreateObject(11425,-4145.31152344,416.10662842,22.39118767,0.00000000,4.00000000,0.00000000); //object(des_adobehooses1) (1)
CreateObject(11425,-4151.93115234,440.79058838,22.49263573,0.00000000,1.99902344,308.00000000); //object(des_adobehooses1) (2)
CreateObject(11425,-4172.51708984,452.81338501,24.10308075,0.00000000,3.99353027,341.99621582); //object(des_adobehooses1) (3)
CreateObject(11427,-4147.55761719,513.60925293,27.65367699,0.00000000,0.00000000,0.00000000); //object(des_adobech) (2)
CreateObject(11425,-4160.10644531,500.08801270,23.62042618,0.00000000,3.99353027,307.99621582); //object(des_adobehooses1) (4)
CreateObject(11425,-4176.77685547,491.07400513,24.30741119,0.00000000,2.49353027,307.99618530); //object(des_adobehooses1) (5)
CreateObject(11425,-4193.47607422,436.01071167,26.35880661,0.00000000,3.99353027,307.99621582); //object(des_adobehooses1) (6)
CreateObject(11425,-4269.10156250,518.87414551,30.56470490,0.00000000,3.99353027,307.99621582); //object(des_adobehooses1) (7)
CreateObject(11425,-4230.38134766,524.06890869,27.34289932,0.00000000,3.99353027,307.99621582); //object(des_adobehooses1) (8)
CreateObject(11425,-4199.31494141,496.22702026,26.26989937,0.00000000,3.49353027,307.99621582); //object(des_adobehooses1) (9)
CreateObject(11425,-4188.91162109,414.40502930,25.59258652,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (10)
CreateObject(11425,-4222.78662109,411.99093628,27.83570099,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (11)
CreateObject(11425,-4191.21923828,525.88720703,25.23175240,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (12)
CreateObject(11425,-4211.55908203,531.18090820,27.01052856,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (13)
CreateObject(11425,-4247.58593750,510.77563477,29.32740402,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (14)
CreateObject(11440,-4253.96630859,525.05334473,28.11667633,0.00000000,4.00000000,4.00000000); //object(des_pueblo1) (3)
CreateObject(11440,-4221.40625000,523.41534424,25.64575958,0.00000000,3.99902344,3.99902344); //object(des_pueblo1) (4)
CreateObject(11440,-4211.16162109,551.51025391,24.36148071,0.00000000,3.99902344,51.99902344); //object(des_pueblo1) (5)
CreateObject(11440,-4274.50000000,551.92321777,30.03575516,0.00000000,3.99353027,329.99829102); //object(des_pueblo1) (6)
CreateObject(13295,-4172.67480469,558.43273926,27.38480186,0.00000000,0.00000000,0.00000000); //object(ce_terminal1) (1)
CreateObject(16096,-4188.29052734,443.84643555,25.71348953,0.00000000,4.00000000,0.00000000); //object(des_a51guardbox04) (1)
CreateObject(16096,-4173.40820312,462.92294312,24.97786331,0.00000000,3.99902344,0.00000000); //object(des_a51guardbox04) (2)
CreateObject(16096,-4135.44921875,551.24951172,22.10956955,0.00000000,3.99902344,0.00000000); //object(des_a51guardbox04) (3)
CreateObject(16096,-4137.31542969,443.52368164,22.50286865,0.00000000,3.99902344,0.00000000); //object(des_a51guardbox04) (4)
CreateObject(11489,-4234.63671875,466.36151123,27.45932961,0.00000000,0.00000000,0.00000000); //object(dam_statues) (1)
CreateObject(11489,-4233.88525391,476.79827881,27.41531754,0.00000000,0.00000000,176.00000000); //object(dam_statues) (2)
CreateObject(11489,-4228.17431641,471.61767578,26.95500565,0.00000000,0.00000000,87.99548340); //object(dam_statues) (3)
CreateObject(11489,-4240.46923828,471.97619629,27.88803482,0.00000000,0.00000000,267.99499512); //object(dam_statues) (4)
CreateObject(11440,-4237.80273438,495.87582397,26.68321228,0.00000000,3.99902344,253.99902344); //object(des_pueblo1) (7)
CreateObject(1570,-4244.15283203,485.60607910,29.40834045,0.00000000,0.00000000,0.00000000); //object(cj_noodle_3) (1)
CreateObject(1570,-4229.16210938,485.75448608,28.36064720,0.00000000,0.00000000,0.00000000); //object(cj_noodle_3) (2)
CreateObject(1570,-4221.72558594,477.62490845,27.86089516,0.00000000,0.00000000,0.00000000); //object(cj_noodle_3) (3)
CreateObject(1570,-4221.98535156,461.80947876,27.91762543,0.00000000,0.00000000,178.00000000); //object(cj_noodle_3) (4)
CreateObject(1570,-4238.56787109,460.09848022,29.08034706,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (5)
CreateObject(1570,-4246.08496094,458.74087524,29.60887527,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (6)
CreateObject(1570,-4213.89111328,418.65747070,27.45737267,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (7)
CreateObject(1570,-4192.52978516,403.35058594,25.88180351,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (8)
CreateObject(1570,-4166.97167969,408.96029663,24.08202934,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (9)
CreateObject(1570,-4175.43847656,422.71926880,24.64015007,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (10)
CreateObject(1570,-4150.18261719,419.15447998,22.88383675,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (11)
CreateObject(1570,-4128.91650391,425.64801025,21.38185692,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (12)
CreateObject(1570,-4171.08886719,435.52880859,24.30492210,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (13)
CreateObject(1570,-4190.18847656,451.88336182,25.59977913,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (14)
CreateObject(1570,-4153.30371094,454.61282349,23.01544762,0.00000000,0.00000000,177.99499512); //object(cj_noodle_3) (15)
CreateObject(1570,-4148.97753906,476.22131348,22.66036415,0.00000000,0.00000000,17.99499512); //object(cj_noodle_3) (16)
CreateObject(1570,-4154.72070312,501.38796997,23.00032425,0.00000000,0.00000000,17.99011230); //object(cj_noodle_3) (17)
CreateObject(1570,-4175.62207031,492.85733032,24.48180008,0.00000000,0.00000000,17.99011230); //object(cj_noodle_3) (18)
CreateObject(3860,-4197.10205078,507.28488159,25.78894997,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (1)
CreateObject(3860,-4183.25000000,530.54949951,24.26412773,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (2)
CreateObject(3860,-4146.09277344,531.23498535,22.16572952,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (3)
CreateObject(3860,-4241.41748047,521.96618652,28.96973801,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (4)
CreateObject(3860,-4234.34082031,553.95623779,28.05200958,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (5)
CreateObject(3860,-4275.59521484,524.32104492,31.35194397,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (6)
CreateObject(3860,-4277.38623047,495.96652222,31.54617882,0.00000000,0.00000000,0.00000000); //object(marketstall04_sfxrf) (7)
CreateObject(621,-4270.64013672,540.37921143,29.79422379,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (8)
CreateObject(621,-4251.83203125,514.43133545,28.54343224,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (9)
CreateObject(621,-4214.19531250,540.21026611,25.85098839,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (10)
CreateObject(621,-4241.19970703,534.45666504,27.75176811,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (11)
CreateObject(621,-4194.93457031,537.78955078,24.39068604,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (12)
CreateObject(621,-4190.49316406,563.44030762,24.01771164,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (13)
CreateObject(621,-4162.23632812,543.82446289,22.09088898,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (14)
CreateObject(621,-4161.48193359,504.85241699,22.13326263,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (15)
CreateObject(621,-4145.93701172,463.94326782,21.14674568,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (16)
CreateObject(621,-4200.96191406,478.50741577,25.07692337,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (17)
CreateObject(621,-4222.48144531,432.11175537,26.69361496,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (18)
CreateObject(621,-4206.13769531,442.14462280,25.52722549,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (19)
CreateObject(621,-4183.66210938,474.18630981,23.75814438,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (20)
CreateObject(621,-4172.81689453,503.18255615,22.92946625,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (21)
CreateObject(621,-4161.42480469,473.00555420,22.20699501,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (22)
CreateObject(621,-4176.73291016,438.90365601,23.35999680,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (23)
CreateObject(621,-4271.45361328,501.43887329,29.94603348,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (24)
CreateObject(621,-4287.67675781,469.62771606,31.15710449,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (25)
CreateObject(621,-4240.13671875,410.34368896,27.98023224,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (26)
CreateObject(621,-4264.11572266,435.85440063,29.59333801,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (27)
CreateObject(621,-4280.92724609,408.89953613,30.83366585,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (28)
CreateObject(621,-4278.98339844,441.11264038,30.61929703,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (29)
CreateObject(11425,-4267.16259766,422.62451172,29.86191559,0.00000000,3.98803711,273.99340820); //object(des_adobehooses1) (15)
CreateObject(11425,-4282.98681641,410.24987793,30.79594421,0.00000000,3.98803711,273.98803711); //object(des_adobehooses1) (16)
CreateObject(11425,-4263.07275391,404.52993774,30.41856003,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (17)
CreateObject(11425,-4232.50634766,429.71548462,29.22156143,0.00000000,3.98803711,341.99340820); //object(des_adobehooses1) (18)
CreateObject(11444,-4258.74267578,422.07147217,29.23795319,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (7)
CreateObject(11444,-4251.82568359,416.31707764,28.15789032,0.00000000,1.99951172,0.00000000); //object(des_pueblo2) (8)
CreateObject(622,-4242.00048828,435.06521606,28.05012894,0.00000000,0.00000000,0.00000000); //object(veg_palm03) (1)
CreateObject(622,-4218.67187500,505.37863159,26.24872780,0.00000000,0.00000000,10.00000000); //object(veg_palm03) (2)
CreateObject(622,-4278.83203125,453.80798340,30.57773590,0.00000000,0.00000000,9.99755859); //object(veg_palm03) (3)
CreateObject(621,-4142.34228516,525.97351074,20.74417496,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (30)
CreateObject(4244,-4355.46191406,481.51043701,-50.89008331,49.99902344,0.00000000,271.99951172); //object(sbsbed9law2) (7)
CreateObject(17026,-4309.34765625,582.59143066,0.00000000,0.00000000,0.00000000,61.99584961); //object(cunt_rockgp2_) (20)
CreateObject(17026,-4303.76513672,577.79583740,11.63603210,0.00000000,26.00000000,61.99584961); //object(cunt_rockgp2_) (21)
CreateObject(17026,-4312.95751953,377.65783691,0.00000000,0.00000000,25.99914551,61.99035645); //object(cunt_rockgp2_) (22)
CreateObject(17026,-4294.44580078,377.55633545,0.00000000,0.00000000,33.99719238,221.98608398); //object(cunt_rockgp2_) (24)
CreateObject(8483,-4303.66162109,479.98522949,23.43522644,0.00000000,0.00000000,178.00000000); //object(pirateland02_lvs) (1)
CreateObject(8483,-4308.83398438,443.62033081,14.05537033,0.00000000,0.00000000,177.99499512); //object(pirateland02_lvs) (2)
CreateObject(8483,-4313.62304688,537.56469727,12.31454849,0.00000000,0.00000000,177.99499512); //object(pirateland02_lvs) (3)
CreateObject(3425,-4274.60302734,473.17831421,41.67795944,0.00000000,0.00000000,0.00000000); //object(nt_windmill) (1)
CreateObject(3425,-4199.55761719,443.53851318,36.50702667,0.00000000,0.00000000,0.00000000); //object(nt_windmill) (2)
CreateObject(3425,-4168.34326172,532.18884277,33.98897171,0.00000000,0.00000000,0.00000000); //object(nt_windmill) (3)
CreateObject(3524,-4115.43652344,488.16259766,21.84145927,0.00000000,0.00000000,92.00000000); //object(skullpillar01_lvs) (1)
CreateObject(3524,-4116.77197266,498.26327515,21.91016006,0.00000000,0.00000000,91.99951172); //object(skullpillar01_lvs) (2)
CreateObject(6865,-4316.73535156,468.36187744,8.51175690,0.00000000,0.00000000,306.00000000); //object(steerskull) (1)
CreateObject(17026,-4294.44384766,384.05142212,12.90374374,0.00000000,25.99914551,97.99035645); //object(cunt_rockgp2_) (25)
CreateObject(7916,-4250.52539062,371.50289917,2.81488037,0.00000000,0.00000000,0.00000000); //object(vegaswaterfall02) (2)
CreateObject(7916,-4188.08154297,377.71597290,3.69437790,0.00000000,0.00000000,0.00000000); //object(vegaswaterfall02) (3)
CreateObject(7916,-4123.24023438,378.74478149,2.82059860,0.00000000,0.00000000,0.00000000); //object(vegaswaterfall02) (4)
CreateObject(621,-4263.04101562,381.38296509,13.84130859,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (31)
CreateObject(621,-4245.47021484,379.87884521,11.62928772,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (32)
CreateObject(621,-4214.05712891,380.42120361,6.91806030,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (33)
CreateObject(621,-4228.49316406,383.67770386,16.38024902,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (34)
CreateObject(621,-4189.03320312,385.42520142,15.01367950,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (35)
CreateObject(621,-4181.42529297,383.23626709,8.96450806,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (36)
CreateObject(621,-4164.50244141,389.05480957,18.46934891,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (37)
CreateObject(621,-4161.30468750,386.83074951,10.11938477,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (38)
CreateObject(621,-4150.32128906,383.38461304,3.55746460,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (39)
CreateObject(621,-4132.21191406,385.75546265,7.32372284,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (40)
CreateObject(621,-4112.86474609,383.42700195,0.00000000,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (41)
CreateObject(621,-4298.16357422,375.62277222,17.18584442,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (42)
CreateObject(621,-4289.65185547,383.09729004,19.74975204,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (43)
CreateObject(621,-4278.90283203,378.68136597,12.82467651,0.00000000,0.00000000,0.00000000); //object(veg_palm02) (44)
CreateObject(848,-4312.69238281,557.44598389,19.03153229,0.00000000,318.00000000,0.00000000); //object(dead_tree_20) (1)
CreateObject(848,-4320.85839844,558.83038330,10.87294102,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (2)
CreateObject(848,-4316.39404297,562.61645508,16.34757233,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (3)
CreateObject(848,-4307.35937500,569.08874512,27.37688446,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (4)
CreateObject(848,-4306.32421875,541.43292236,27.45995331,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (5)
CreateObject(848,-4317.56787109,549.45843506,14.40256977,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (6)
CreateObject(848,-4307.84033203,555.16412354,26.22525024,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (7)
CreateObject(848,-4324.74121094,551.48577881,5.94332218,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (8)
CreateObject(848,-4322.75439453,529.03186035,7.37605000,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (9)
CreateObject(848,-4311.38183594,533.69866943,21.11478424,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (10)
CreateObject(848,-4312.86230469,544.97497559,19.82034302,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (11)
CreateObject(848,-4306.27490234,519.79998779,26.61911774,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (12)
CreateObject(848,-4317.63037109,523.48718262,13.24812794,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (13)
CreateObject(848,-4307.91503906,511.11471558,24.30455780,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (14)
CreateObject(848,-4323.19921875,514.66564941,6.24887943,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (15)
CreateObject(848,-4323.15576172,494.37603760,5.45684528,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (16)
CreateObject(848,-4314.17236328,499.71987915,16.37824249,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (17)
CreateObject(848,-4307.06103516,462.32272339,23.29277802,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (18)
CreateObject(848,-4316.40136719,481.60458374,12.97059345,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (19)
CreateObject(848,-4305.39794922,448.77459717,24.71060944,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (20)
CreateObject(848,-4321.81933594,462.48056030,5.72263813,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (21)
CreateObject(848,-4319.65966797,446.42605591,7.62705708,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (22)
CreateObject(848,-4304.41796875,441.67141724,25.58209229,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (23)
CreateObject(848,-4310.27441406,419.95800781,17.70421600,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (24)
CreateObject(848,-4317.41845703,427.73068237,9.51913929,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (25)
CreateObject(848,-4308.14550781,431.02996826,20.70034790,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (26)
CreateObject(848,-4302.28906250,411.11386108,26.84690094,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (27)
CreateObject(848,-4316.50048828,413.86578369,10.03587437,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (28)
CreateObject(848,-4308.02587891,401.08453369,19.59764099,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (29)
CreateObject(848,-4317.15576172,400.85852051,8.71439838,0.00000000,317.99926758,0.00000000); //object(dead_tree_20) (30)
CreateObject(622,-4113.53417969,472.47082520,13.31945419,0.00000000,0.00000000,9.99755859); //object(veg_palm03) (4)
CreateObject(622,-4118.51074219,514.76550293,13.85630035,0.00000000,0.00000000,195.99755859); //object(veg_palm03) (5)
/////////////////////////////=======================================////////////////////////////
return 1;
}




public OnPlayerRequestClass(playerid, classid)
{
if(classid == 0)
    {
        gTeam[playerid] = TEAM_SWAT;
    }
if(classid == 1)
    {
        gTeam[playerid] = TEAM_TERRORIST;
    }
   

   switch(classid)

{
    case 0: GameTextForPlayer(playerid, "~b~S.W.A.T Team",1000, 5);
    case 1: GameTextForPlayer(playerid, "~r~TERRORIST Team",1000, 5);
}

   return 1;
}

public OnGameModeExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
    return 1;
}



public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}


public OnPlayerSpawn(playerid) { // OnPlayerSpawn Callback
    switch ( MapChange  ) { // you must have a case for the mapchange to get the list going
          case 0: { // MapChange1 this is the part for MapChange = 0; Which basically starts of the first MapChangein the list
        if(gTeam[playerid] == TEAM_SWAT)
        {
        SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
        SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
      }
      }

      case 1: { // MapChange2 same settings on top
            SetPlayerFacingAngle(playerid,0.0);
      }
          case 2: { // blah blah next MapChangestuff here

          }
     }
     return 1;
}
public OnFilterScriptExit()
{
    return 1;
}
public NewMapTimer(playerid) { // The callback we forwarded on the beginning of the tutorial
    MapChange++; // this makes it to go to the second MapChange++ part basically does it
    GameTextForAll("~b~ Loading new ~w~MAP",4000,3); // Sends everyone in server a gametext
    SetTimer("StartedNewRound",4000,false); // Starts a new timer for the MapChangechange 4 seconds this basically starts the new MapChangeand always must be in false
    return 1;
}
public StartedNewRound() // The callback we forwarded in the beginning of this tutorial
{
    for(new i = 0; i < MAX_PLAYERS; i++) // this loops everyone in the server also you can use foreach include for this part
    {
        SpawnPlayer ( i ) ; // Re Spawns everyone in the server which then gets OnPlayerSpawn Callback called
       switch ( MapChange ) { // This part is basically for your new MapChangesettings like giving them weapons
                 case 0:{
            SendClientMessage(i,-1,"New MapChangeLoad");
                 }
             case 1: {
            SendClientMessage(i,-1,"New MapChangeLoad");
                 }
                     case 2: { // Next Spawn Settings

                     }
         }
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{

    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{

    return 0;
}

/////////////////////////////////////////////////////////////////////////////////////////////////
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate) // The OnPlayerStateChange function
{

  return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{

    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{

    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{


    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
is is automaticaly the Players go in their Position Each map ?
who can help me to make the SWAT go to SWAT position for this Round , also for TERRORISTS THanks
Reply
#2

pawn Код:
public OnPlayerSpawn(playerid)
{
    switch ( MapChange  )
    {
        case 0:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }

        case 1:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
        case 2:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
    }
    return 1;
}
That will do it. Change everything to your own needs
Reply
#3

wow wtf you made a new map? alot of objects ..... good job
Reply
#4

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
pawn Код:
public OnPlayerSpawn(playerid)
{
    switch ( MapChange  )
    {
        case 0:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }

        case 1:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
        case 2:
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
    }
    return 1;
}
That will do it. Change everything to your own needs
Thank You , Case0 is attached to MapChange= 0; ? need i to change something ?
Reply
#5

pawn Код:
public OnPlayerSpawn(playerid)
{
    switch ( MapChange  )
    {
        case 0: // this is map 1 (or 0, dunno how you defined it)
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }

        case 1: // this is map 2 (or 1, dunno how you defined it)
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
        case 2: // this is map 3 (or 2, dunno how you defined it)
        {
            if(gTeam[playerid] == TEAM_SWAT)
            {
                SetPlayerPos(playerid , -4198.6240,395.5814,26.1159,18.4021);
                SetPlayerFacingAngle(playerid,0.0); // Facing Angle of the first map
            }
            else if( gTeam[playerid] == TEAM_TERRORIST )
            {
                // SetPlayerPos(playerid, x,y,z);
                // etc etc
            }
        }
    }
    return 1;
}
Hope this will makes it clear up what the code does
Reply
#6

so , this: MapChange= 0; for case 0 ? and to create an other map : MapChange= 1; to case 1 ?

Thanks.
Reply
#7

pawn Код:
switch( MapChange )
{
    case 0: // the same as 'if( MapChange == 0 )'
    {

    }
    case 1: // the same as 'if( MapChange == 1 )'
    {

    }
    return 1;
}
Reply
#8

Thank you !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)