Guest User

Untitled

a guest
Feb 4th, 2012
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.78 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6.  
  7. #define MAX_CPS 500 //Change it if you need more or less
  8.  
  9. #define TEAM_Latino 1
  10. #define TEAM_Souviet 2
  11. #define TEAM_Arabian 3
  12. #define TEAM_USA 4
  13. #define TEAM_Europian 5
  14. #define TEAM_Japan 6
  15. #define TEAM_Taliban 7
  16.  
  17. #define TEAM_Latino_COLOR 0x00F3FFAF
  18. #define TEAM_Souviet_COLOR 0xCA0000FF
  19. #define TEAM_Arabian_COLOR 0xD70000FF
  20. #define TEAM_USA_COLOR 0x1400C3FF
  21. #define TEAM_Europian_COLOR 0x005E0089
  22. #define TEAM_Japan_COLOR 0xFAFAFFFF
  23. #define TEAM_Taliban_COLOR 0xFFFFFFFF
  24. #define TEAM_Admin_COLOR 0xFF00F5FF
  25. #define COLOR_GREEN 0x33AA33AA
  26.  
  27. new gTeam[MAX_PLAYERS];
  28.  
  29. enum Info //CP ENUM
  30. {
  31. Float:CPX, //Xpos
  32. Float:CPY, //Ypos
  33. Float:CPZ, //Zpos
  34. Float:Size, //Size of the CP
  35. Float:Viewdist //Viewdistance
  36. };
  37.  
  38. new CPID = -1; //CPID
  39. new PlayerCP[MAX_PLAYERS] = -1; //PlayerCheckpoints (Only one can be active at once).
  40. new CPinfo[MAX_CPS][Info]; //CPINFO
  41. new CPActive[MAX_PLAYERS][MAX_CPS]; //CPActive for player
  42. new CPDisabled[MAX_CPS]; //For disabling checkpoints
  43.  
  44. new Hospital,SnakForme,GS,NearGs,DareHdaKhodare,DesertAirport,Area51,NearUsa,Motel,NearTaliban,ChikenResteaurant,Mercyonary,GS2,GreenPalms,StationStagSan;
  45. new Stationje,Ship,RadareHdaKhodare,HdaLatino,MoraEurop,HdaArabeBhare,Hafra;
  46. stock CreateCheckpoint(playerid, Float:cpX, Float:cpY, Float:cpZ, Float:cpSize, Float:viewdist = 35.0)
  47. {
  48. CPID ++; //CPID
  49. CPinfo[CPID][CPX] = cpX; //CPX Pos
  50. CPinfo[CPID][CPY] = cpY; //CPY Pos
  51. CPinfo[CPID][CPZ] = cpZ; //CPZ Pos
  52. CPinfo[CPID][Size] = cpSize; //Checkpoint Size
  53. CPinfo[CPID][Viewdist] = viewdist; //View distance
  54. if(playerid != -1)
  55. {
  56. CPActive[playerid][CPID] ++; //Makes the player able to view that checkpoint
  57. }
  58. if(playerid == -1)
  59. {
  60. for(new i; i<MAX_PLAYERS; i++)
  61. {
  62. CPActive[i][CPID] ++;
  63. }
  64. }
  65. return CPID;
  66. }
  67.  
  68. new CPS1,CPS2,CPS3,CPS4,CPS5,CPS6,CPS7,CPS8,CPS9,CPS10,CPS11,CPS12,CPS13,CPS14,CPS15,CPS16,CPS17,CPS18,CPS19,CPS20;
  69.  
  70.  
  71.  
  72.  
  73. public OnGameModeInit()
  74. {
  75. Hospital = GangZoneCreate(980.9415,945.9079,1167.788,1132.754);
  76. SnakForme = GangZoneCreate(-70.06725, 2300.542, 11.67788, 2382.287);
  77. GS = GangZoneCreate(595.5717, 1669.936, 665.6389, 1763.359);
  78. NearGs = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  79. DareHdaKhodare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  80. DesertAirport = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  81. Area51 = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  82. NearUsa = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  83. Motel = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  84. NearTaliban = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  85. ChikenResteaurant = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  86. Mercyonary = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  87. GS2 = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  88. GreenPalms = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  89. StationStagSan = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  90. Stationje = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  91. Ship = GangZoneCreate(-1494.768, 1424.701, -1342.956, 1529.802);
  92. RadareHdaKhodare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  93. HdaLatino = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  94. MoraEurop = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  95. HdaArabeBhare = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  96. Hafra = GangZoneCreate(759.0619, 1646.58, 829.1292, 1728.326);
  97.  
  98. print("Starting timer...");
  99. SetTimer("message", 30000, false); // Set a timer of 1000 miliseconds (1 second)
  100.  
  101. UsePlayerPedAnims();
  102. AddPlayerClass(108,1091.8289,1892.5746,10.8203,181.3648,0,0,0,0,0,0); //Latino (0)
  103. AddPlayerClass(206,-570.2114,400.6104,3.2266,181.0366,0,0,0,0,0,0); //Souviet (1)
  104. AddPlayerClass(179,-828.5663,1589.5376,27.0546,133.1694,0,0,0,0,0,0); //Arabian(2)
  105. AddPlayerClass(287,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //USA (3)
  106. AddPlayerClass(285,-148.1873,1142.0114,19.7422,16.0408,0,0,0,0,0,0); //Europian(4)
  107. AddPlayerClass(188,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Japan (5).
  108. AddPlayerClass(163,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Taliban(6)
  109. AddPlayerClass(217,1544.0514,-1675.7766,13.5577,98.0974,0,0,0,0,0,0); //Taliban(6)
  110.  
  111.  
  112. CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0); //hospital
  113. CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0);
  114. CPS1 = CreateCheckpoint(-1, 1058.3783,1013.4809,11.0000, 3.0, 20.0);
  115.  
  116. CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0); //dare hda khodare
  117. CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0);
  118. CPS2 = CreateCheckpoint(-1, 600.4058,1246.9574,11.7188, 3.0, 20.0);
  119.  
  120. CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0); // li hda G.s
  121. CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0);
  122. CPS3 = CreateCheckpoint(-1, 792.6951,1676.6018,5.2813, 3.0, 20.0);
  123.  
  124. CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0); //G.S
  125. CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0);
  126. CPS4 = CreateCheckpoint(-1, 671.6403,1705.2162,7.1875, 3.0, 20.0);
  127.  
  128. CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0); // desert airport
  129. CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0);
  130. CPS5 = CreateCheckpoint(-1, 255.2821,1801.9551,7.4678, 3.0, 20.0);
  131.  
  132. CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0); //// snake form
  133. CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0);
  134. CPS6 = CreateCheckpoint(-1, -30.9357,2349.5161,24.3026, 3.0, 20.0);
  135.  
  136. CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0); // li hda usa
  137. CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0);
  138. CPS7 = CreateCheckpoint(-1, -514.1067,2555.6624,57.8328, 3.0, 20.0);
  139.  
  140. CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0); // motel
  141. CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0);
  142. CPS8 = CreateCheckpoint(-1, -782.7257,2761.3533,45.6584, 3.0, 20.0);
  143.  
  144. CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0); // gda taliban
  145. CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0);
  146. CPS9 = CreateCheckpoint(-1, -1481.1814,2620.4397,58.7813, 3.0, 20.0);
  147.  
  148. CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0); // G.S 2
  149. CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0);
  150. CPS10 = CreateCheckpoint(-1, -1471.6180,1863.3539,32.6328, 3.0, 20.0);
  151.  
  152. CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0); // Chiken resteaurant
  153. CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0);
  154. CPS11 = CreateCheckpoint(-1, -1193.9451,1808.6306,42.0454, 3.0, 20.0);
  155.  
  156. CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0); // Dhip
  157. CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0);
  158. CPS12 = CreateCheckpoint(-1, -1366.3871,1489.2065,11.0391, 3.0, 20.0);
  159.  
  160. CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0); // Mercyonary
  161. CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0);
  162. CPS13 = CreateCheckpoint(-1, -1676.7924,1208.5317,21.1487, 3.0, 20.0);
  163.  
  164. CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0); // Staqtion dyal san stage
  165. CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0);
  166. CPS14 = CreateCheckpoint(-1, -1705.2834,1018.5080,17.5859, 3.0, 20.0);
  167.  
  168. CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0); // Station 2
  169. CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0);
  170. CPS15 = CreateCheckpoint(-1, -1605.8220,675.7318,-5.2422, 3.0, 20.0);
  171.  
  172. CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0);
  173. CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0);
  174. CPS16 = CreateCheckpoint(-1, 221.0342,1424.6184,10.5859, 3.0, 20.0); // green palms
  175.  
  176. CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0);
  177. CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0);
  178. CPS17 = CreateCheckpoint(-1,-342.9096,1544.0818,75.5625, 3.0, 40.0); // radare (hda khodare)
  179. SetTimer("Stream", 300, true);
  180.  
  181. // Don't use these lines if it's a filterscript
  182. SetGameModeText("Blank Script");
  183. return 1;
  184. }
  185.  
  186.  
  187. forward Stream();
  188. public Stream()
  189. {
  190. for(new i; i < MAX_PLAYERS; i ++) //Loops through 500 players
  191. {
  192. if(IsPlayerConnected(i)) //Brings the 500 players down to the online ones
  193. {
  194. PlayerCP[i] = -1;
  195. for(new j; j < CPID + 1; j ++) //Loops through all CP's
  196. {
  197. if(CPDisabled[j] == 0) //Checks if the CP is disabled.
  198. {
  199. if(IsPlayerInRangeOfPoint(i, CPinfo[j][Viewdist], CPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ]) && CPActive[i][j] == 1) //Is the player in range of a CP
  200. {
  201. SetPlayerCheckpoint(i, CPinfo[j][CPX], CPinfo[j][CPY], CPinfo[j][CPZ], CPinfo[j][Size]);//Sets the player checkpoint
  202. PlayerCP[i] = j; //Sets the player checkpoint to that in the variable.
  203. printf("PCP:%d", j);
  204. }
  205. }
  206. }
  207. if(PlayerCP[i] == -1) //If there is no CP close enough
  208. {
  209. print("NAHBRO");
  210. PlayerCP[i] = -1; //PlayerCP isn't anything
  211. DisablePlayerCheckpoint(i); //Disable any checkpoint visible.
  212. continue;
  213. }
  214. }
  215. }
  216. return 1;
  217. }
  218.  
  219. public OnGameModeExit()
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnPlayerRequestClass(playerid, classid)
  225. {
  226. SetPlayerPos(playerid,1984.4445,157.9501,55.9384);
  227. SetPlayerCameraPos(playerid,1984.4445,160.9501,55.9384);
  228. SetPlayerCameraLookAt(playerid,1984.4445,157.9501,55.9384);
  229. SetPlayerTeamFromClass(playerid, classid);
  230. return 1;
  231. }
  232.  
  233. public OnPlayerConnect(playerid)
  234. {
  235. return 1;
  236. }
  237.  
  238. public OnPlayerDisconnect(playerid, reason)
  239. {
  240. return 1;
  241. }
  242.  
  243. public OnPlayerSpawn(playerid)
  244. {
  245. GangZoneShowForPlayer(playerid, Hospital, 0x00000096);
  246. GangZoneShowForPlayer(playerid, SnakForme, 0x00000096);
  247. GangZoneShowForPlayer(playerid, GS, 0x00000096);
  248. GangZoneShowForPlayer(playerid, NearGs, 0x00000096);
  249. GangZoneShowForPlayer(playerid, DareHdaKhodare, 0x00000096);
  250. GangZoneShowForPlayer(playerid, DesertAirport, 0x00000096);
  251. GangZoneShowForPlayer(playerid, Area51, 0x00000096);
  252. GangZoneShowForPlayer(playerid, NearUsa, 0x00000096);
  253. GangZoneShowForPlayer(playerid, Motel, 0x00000096);
  254. GangZoneShowForPlayer(playerid, NearTaliban, 0x00000096);
  255. GangZoneShowForPlayer(playerid, ChikenResteaurant, 0x00000096);
  256. GangZoneShowForPlayer(playerid, Mercyonary, 0x00000096);
  257. GangZoneShowForPlayer(playerid, GS2, 0x00000096);
  258. GangZoneShowForPlayer(playerid, GreenPalms, 0x00000096);
  259. GangZoneShowForPlayer(playerid, StationStagSan, 0x00000096);
  260. GangZoneShowForPlayer(playerid, Stationje, 0x00000096);
  261. GangZoneShowForPlayer(playerid, RadareHdaKhodare, 0x00000096);
  262. GangZoneShowForPlayer(playerid, Ship, 0x00000096);
  263. GangZoneShowForPlayer(playerid, HdaLatino, 0x00000096);
  264. GangZoneShowForPlayer(playerid, MoraEurop, 0x00000096);
  265. GangZoneShowForPlayer(playerid, HdaArabeBhare, 0x00000096);
  266. GangZoneShowForPlayer(playerid, Hafra, 0x00000096);
  267.  
  268. SetPlayerToTeamColor(playerid);
  269. return 1;
  270. }
  271.  
  272. SetPlayerTeamFromClass(playerid, classid)
  273. {
  274. if (classid == 0)
  275. {
  276. gTeam[playerid] = TEAM_Latino;
  277. }
  278. else if (classid == 1)
  279. {
  280. gTeam[playerid] = TEAM_Souviet;
  281. }
  282. else if (classid == 2)
  283. {
  284. gTeam[playerid] = TEAM_Arabian;
  285. }
  286. else if (classid == 3)
  287. {
  288. gTeam[playerid] = TEAM_USA;
  289. }
  290. else if (classid == 4)
  291. {
  292. gTeam[playerid] = TEAM_Europian;
  293. }
  294. else if (classid == 5)
  295. {
  296. gTeam[playerid] = TEAM_Japan;
  297. }
  298. else if (classid == 6)
  299. {
  300. gTeam[playerid] = TEAM_Taliban;
  301. }
  302. }
  303.  
  304.  
  305.  
  306. SetPlayerToTeamColor(playerid)
  307. {
  308. if (gTeam[playerid] == TEAM_Latino)
  309. {
  310. SetPlayerColor(playerid, TEAM_Latino_COLOR);
  311. }
  312. else if (gTeam[playerid] == TEAM_Souviet)
  313. {
  314. SetPlayerColor(playerid, TEAM_Souviet_COLOR);
  315. }
  316.  
  317. else if (gTeam[playerid] == TEAM_Arabian)
  318. {
  319. SetPlayerColor(playerid, TEAM_Arabian_COLOR);
  320. }
  321.  
  322. else if (gTeam[playerid] == TEAM_USA)
  323. {
  324. SetPlayerColor(playerid, TEAM_USA_COLOR);
  325. }
  326.  
  327. else if (gTeam[playerid] == TEAM_Europian)
  328. {
  329. SetPlayerColor(playerid, TEAM_Europian_COLOR);
  330. }
  331.  
  332. else if (gTeam[playerid] == TEAM_Japan)
  333. {
  334. SetPlayerColor(playerid, TEAM_Japan_COLOR);
  335. }
  336. else if (gTeam[playerid] == TEAM_Taliban)
  337. {
  338. SetPlayerColor(playerid, TEAM_Taliban_COLOR);
  339. }
  340. return 1;
  341. }
  342.  
  343.  
  344. public OnPlayerDeath(playerid, killerid, reason)
  345. {
  346. return 1;
  347. }
  348.  
  349. public OnVehicleSpawn(vehicleid)
  350. {
  351. return 1;
  352. }
  353. public OnVehicleDeath(vehicleid, killerid)
  354. {
  355. return 1;
  356. }
  357.  
  358. public OnPlayerText(playerid, text[])
  359. {
  360. return 1;
  361. }
  362.  
  363. public OnPlayerCommandText(playerid, cmdtext[])
  364. {
  365. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  366. {
  367. // Do something here
  368. return 1;
  369. }
  370. return 0;
  371. }
  372.  
  373. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  374. {
  375. return 1;
  376. }
  377.  
  378. public OnPlayerExitVehicle(playerid, vehicleid)
  379. {
  380. return 1;
  381. }
  382.  
  383. public OnPlayerStateChange(playerid, newstate, oldstate)
  384. {
  385. return 1;
  386. }
  387.  
  388. public OnPlayerEnterCheckpoint(playerid)
  389. {
  390. if(PlayerCP[playerid] != -1) return OnPlayerEnterStreamedCheckpoint(playerid, PlayerCP[playerid]);
  391. return 1;
  392. }
  393.  
  394. stock OnPlayerEnterStreamedCheckpoint(playerid, CPiD)
  395. {
  396. if(CPiD == CPS1)
  397. {
  398. GameTextForPlayer(playerid, "Stay her to capture hospital!", 3000, 3);
  399. SetTimerEx("Stream",20000,false,"i",playerid);
  400. if(gTeam[playerid]==TEAM_Latino)
  401. {
  402. GangZoneShowForAll(Hospital,0x00F3FFAF);
  403. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  404. GivePlayerMoney(playerid,6000);
  405. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  406. GiveTeamScore(gTeam[playerid]=TEAM_Latino, 1);
  407. SendTeamMessage(COLOR_GREEN, "You received 1 Score For a Capture!",TEAM_Latino);
  408.  
  409. }
  410. if(gTeam[playerid]==TEAM_USA)
  411. {
  412. GangZoneShowForAll(Hospital,0x1400C3FF);
  413. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  414. GivePlayerMoney(playerid,6000);
  415. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  416. }
  417. if(gTeam[playerid]==TEAM_Arabian)
  418. {
  419. GangZoneShowForAll(Hospital,0xD70000FF);
  420. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  421. GivePlayerMoney(playerid,6000);
  422. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  423. }
  424. if(gTeam[playerid]==TEAM_Japan)
  425. {
  426. GangZoneShowForAll(Hospital,0xFAFAFFFF);
  427. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  428. GivePlayerMoney(playerid,6000);
  429. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  430. }
  431. if(gTeam[playerid]==TEAM_Souviet)
  432. {
  433. GangZoneShowForAll(Hospital,0xCA0000FF);
  434. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  435. GivePlayerMoney(playerid,6000);
  436. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  437. }
  438. if(gTeam[playerid]==TEAM_Europian)
  439. {
  440. GangZoneShowForAll(Hospital,0x005E0089);
  441. SetPlayerScore(playerid,GetPlayerScore(playerid)+5 );
  442. GivePlayerMoney(playerid,6000);
  443. SendClientMessage(playerid,0xFFFFFFFF,"You've capture the zone and receive 500 $ and 5 score");
  444. }
  445. }
  446. if(CPiD == CPS2)
  447. {
  448. GameTextForPlayer(playerid, "Dare hda khodare!", 3000, 3);
  449. }
  450. if(CPiD == CPS3)
  451. {
  452. GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
  453. }
  454. if(CPiD == CPS4)
  455. {
  456. GameTextForPlayer(playerid, "G.S!", 3000, 3);
  457. }
  458. if(CPiD == CPS5)
  459. {
  460. GameTextForPlayer(playerid, "Desert Airport", 3000, 3);
  461. }
  462. if(CPiD == CPS6)
  463. {
  464. GameTextForPlayer(playerid, "Snak Forme", 3000, 3);
  465. }
  466. if(CPiD == CPS7)
  467. {
  468. GameTextForPlayer(playerid, "Li hda USA", 3000, 3);
  469. }
  470. if(CPiD == CPS8)
  471. {
  472. GameTextForPlayer(playerid, "Motel", 3000, 3);
  473. }
  474. if(CPiD == CPS9)
  475. {
  476. GameTextForPlayer(playerid, "Hda taliban", 3000, 3);
  477. }
  478. if(CPiD == CPS10)
  479. {
  480. GameTextForPlayer(playerid, "G.S 2!", 3000, 3);
  481. }
  482. if(CPiD == CPS11)
  483. {
  484. GameTextForPlayer(playerid, "Checken restaurant", 3000, 3);
  485. }
  486. if(CPiD == CPS12)
  487. {
  488. GameTextForPlayer(playerid, "Ship", 3000, 3);
  489. }
  490. if(CPiD == CPS13)
  491. {
  492. GameTextForPlayer(playerid, "Mercyonary", 3000, 3);
  493. }
  494. if(CPiD == CPS14)
  495. {
  496. GameTextForPlayer(playerid, "Staion dyal sane stage", 3000, 3);
  497. }
  498. if(CPiD == CPS15)
  499. {
  500. GameTextForPlayer(playerid, "Station2", 3000, 3);
  501. }
  502. if(CPiD == CPS16)
  503. {
  504. GameTextForPlayer(playerid, "green palms", 3000, 3);
  505. }
  506. if(CPiD == CPS17)
  507. {
  508. GameTextForPlayer(playerid, "radare (hda khodare)", 3000, 3);
  509. }
  510. if(CPiD == CPS18)
  511. {
  512. GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
  513. }
  514. if(CPiD == CPS19)
  515. {
  516. GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
  517. }
  518. if(CPiD == CPS20)
  519. {
  520. GameTextForPlayer(playerid, "Near G.S!", 3000, 3);
  521. }
  522. return 1;
  523. }
  524.  
  525. stock DestroyCheckpoint(CPiD) //Destory's a checkpoint
  526. {
  527. CPDisabled[CPiD] = 1;
  528. for(new i; i< MAX_PLAYERS; i++)
  529. {
  530. if(PlayerCP[i] == CPiD)
  531. {
  532. DisablePlayerCheckpoint(i);
  533. }
  534. }
  535. }
  536.  
  537.  
  538. stock TogglePlayerCheckpoint(playerid, CPiD, toggled) //Toggles a checkpoint for a player 0 = Not active, 1 = active :)
  539. {
  540. CPActive[playerid][CPiD] = toggled;
  541. }
  542.  
  543. public OnPlayerLeaveCheckpoint(playerid)
  544. {
  545. return 1;
  546. }
  547.  
  548. public OnPlayerEnterRaceCheckpoint(playerid)
  549. {
  550. return 1;
  551. }
  552.  
  553. public OnPlayerLeaveRaceCheckpoint(playerid)
  554. {
  555. return 1;
  556. }
  557.  
  558. public OnRconCommand(cmd[])
  559. {
  560. return 1;
  561. }
  562.  
  563. public OnPlayerRequestSpawn(playerid)
  564. {
  565. return 1;
  566. }
  567.  
  568. public OnObjectMoved(objectid)
  569. {
  570. return 1;
  571. }
  572.  
  573. public OnPlayerObjectMoved(playerid, objectid)
  574. {
  575. return 1;
  576. }
  577.  
  578. public OnPlayerPickUpPickup(playerid, pickupid)
  579. {
  580. return 1;
  581. }
  582.  
  583. public OnVehicleMod(playerid, vehicleid, componentid)
  584. {
  585. return 1;
  586. }
  587.  
  588. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  589. {
  590. return 1;
  591. }
  592.  
  593. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  594. {
  595. return 1;
  596. }
  597.  
  598. public OnPlayerSelectedMenuRow(playerid, row)
  599. {
  600. return 1;
  601. }
  602.  
  603. public OnPlayerExitedMenu(playerid)
  604. {
  605. return 1;
  606. }
  607.  
  608. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  609. {
  610. return 1;
  611. }
  612.  
  613. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  614. {
  615. return 1;
  616. }
  617.  
  618. public OnRconLoginAttempt(ip[], password[], success)
  619. {
  620. return 1;
  621. }
  622.  
  623. public OnPlayerUpdate(playerid)
  624. {
  625. return 1;
  626. }
  627.  
  628. public OnPlayerStreamIn(playerid, forplayerid)
  629. {
  630. return 1;
  631. }
  632.  
  633. public OnPlayerStreamOut(playerid, forplayerid)
  634. {
  635. return 1;
  636. }
  637.  
  638. public OnVehicleStreamIn(vehicleid, forplayerid)
  639. {
  640. return 1;
  641. }
  642.  
  643. public OnVehicleStreamOut(vehicleid, forplayerid)
  644. {
  645. return 1;
  646. }
  647.  
  648. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  649. {
  650. return 1;
  651. }
  652.  
  653. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  654. {
  655. return 1;
  656. }
  657. stock GiveTeamScore(teamid, score) // Try this code
  658. {
  659. for(new i; i < MAX_PLAYERS; i++)
  660. {
  661. if(gTeam[i] == teamid)
  662. {
  663. SetPlayerScore(i, GetPlayerScore(i) + score);
  664. }
  665. }
  666. }
  667. stock SendTeamMessage(color, string[],team)
  668. {
  669. for(new i = 0; i < MAX_PLAYERS; i++)
  670. {
  671. if(IsPlayerConnected(i))
  672. {
  673. if(gTeam[i] == team)
  674. {
  675. SendClientMessage(i, color, string);
  676. }
  677. }
  678. }
  679. }
Advertisement
Add Comment
Please, Sign In to add comment