Guest User

Los Santos gangwar v1.2.5

a guest
May 22nd, 2014
1,021
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 117.11 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. #include <zcmd>
  7. #include <sscanf2>
  8. #include <foreach>
  9. #include <YSI\y_ini>
  10. native WP_Hash(buffer[],len,const str[]);
  11.  
  12. #if defined FILTERSCRIPT
  13.  
  14. public OnFilterScriptInit()
  15. {
  16. print("\n--------------------------------------");
  17. print(" GangWar");
  18. print("--------------------------------------\n");
  19. return 1;
  20. }
  21.  
  22. public OnFilterScriptExit()
  23. {
  24. return 1;
  25. }
  26.  
  27. #else
  28. //Admin ranks
  29. #define adminlevel1 "Moderator"
  30. #define adminlevel2 "Adminstrator"
  31. #define adminlevel3 "Senior Adminstrator"
  32. #define adminlevel4 "Developer"
  33. #define adminlevel5 "Owner"
  34.  
  35. //for weapon stuff
  36. #define ARMEDBODY_USE_HEAVY_WEAPON (false)
  37.  
  38. static
  39. armedbody_pTick[MAX_PLAYERS];
  40.  
  41. //login stuff
  42. #define DIALOG_REGISTER 1
  43. #define DIALOG_LOGIN 2
  44. #define DIALOG_SUCCESS_1 3
  45. #define DIALOG_SUCCESS_2 4
  46.  
  47. #define PATH "/Users/%s.ini"
  48. //Colors
  49. #define Grey 0xAFAFAFAA
  50. #define COLOR_CYAN 0x00FFFFFF
  51. #define COLOR_BRIGHTRED 0xFF000AAA
  52. #define COLOR_COPS 0x0080FFFF
  53. #define COLOR_BALLA 0xFF00FFFF
  54. #define COLOR_BALLAS 0xFF00FFFF
  55. #define COLOR_VEGOSS 0xFFFF00FF
  56. #define COLOR_GROVE 0x00FF00FF
  57. #define COLOR_GROVES 0x00FF00FF
  58. #define COLOR_VEGOS 0xFFFF00FF
  59. #define COLOR_AZTECS 0x00FFFFFF
  60. #define COLOR_RED 0xFF0000FF
  61. #define COLOR_GREEN 0x008000FF
  62. #define COLOR_VIOLET 0x800080FF
  63. #define COLOR_LIGHTBLUE0 0x00FFFFFF
  64. #define COLOR_YELLOW 0xFFFF00FF
  65. #define COLOR_BLUE 0x0000A0FF
  66. #define COLOR_LIGHTBLUE 0x33CCFF19
  67. #define COL_WHITE "{FFFFFF}"
  68. #define COL_RED "{F81414}"
  69. #define COL_GREEN "{00FF22}"
  70. #define COL_LIGHTBLUE "{00CED1}"
  71. #pragma tabsize 0
  72.  
  73. #define COLOR_WHITE 0xFFFFFFAA
  74.  
  75. #define MAX_HOUSES 200
  76.  
  77. #define COLOR_YELLOW 0xFFFF00FF
  78. #define COLOR_RED 0xFF0000FF
  79.  
  80. #define TEAM_GROVE 1
  81. #define TEAM_BALLAS 2
  82. #define TEAM_VAGOS 3
  83. #define TEAM_SWAT 4
  84. #define TEAM_AZTECS 5
  85. #define TEAM_ARMY 6
  86.  
  87. #define TAKEOVER_TIME 1200 // how many milesseconds needed to take over the zone
  88. #define MIN_MEMBERS_TO_START_WAR 5 // how many team members needed in a zone to start a war
  89. #define TAKEOVER_TIMEA 1200
  90. #define MIN_DEATHS_TO_START_WAR 5 // how many team members must be killed in a zone to start a war
  91.  
  92. #undef MAX_PLAYERS
  93. #define MAX_PLAYERS (50)
  94.  
  95. enum pInfo
  96. {
  97. Pass[129],
  98. Cash,
  99. Admin,
  100. VIP,
  101. Kills,
  102. Deaths,
  103. Score,
  104. Bans
  105. }
  106. new PlayerInfo[MAX_PLAYERS][pInfo];
  107.  
  108. forward ZoneTimer(playerid);
  109. forward ZoneTimerA();
  110. forward ForEachTimer();
  111. forward LoadUser_data(playerid,name[],value[]);
  112. public LoadUser_data(playerid,name[],value[])
  113. {
  114. INI_String("Password", PlayerInfo[playerid][Pass],129);
  115. INI_Int("Cash",PlayerInfo[playerid][Cash]);
  116. INI_Int("Admin",PlayerInfo[playerid][Admin]);
  117. INI_Int("VIP",PlayerInfo[playerid][VIP]);
  118. INI_Int("Kills",PlayerInfo[playerid][Kills]);
  119. INI_Int("Deaths",PlayerInfo[playerid][Deaths]);
  120. INI_Int("Scores",PlayerInfo[playerid][Score]);
  121. INI_Int("Banned",PlayerInfo[playerid][Bans]);
  122. return 1;
  123. }
  124.  
  125. main()
  126. {
  127. print("\n----------------------------------");
  128. print(" Gangwar v1.2.3");
  129. print("----------------------------------\n");
  130. }
  131.  
  132. #endif
  133. enum eZone
  134. {
  135. Float:zMinX,
  136. Float:zMinY,
  137. Float:zMaxX,
  138. Float:zMaxY,
  139. zTeam
  140. }
  141. new ZoneInfo[][eZone] = {
  142. {2345.598388, -1773.024414, 2521.598388, -1581.024414,TEAM_GROVE},
  143. {2204.362792, -1776.409790, 2348.362792, -1584.409790,TEAM_GROVE},
  144. {2400.125732, -1923.646606, 2520.125732, -1771.646606,TEAM_GROVE},
  145. {2195.252197, -1885.497192, 2419.252197, -1765.497192,TEAM_GROVE},
  146. {2076.594970, -1765.078979, 2204.594970, -1581.078979,TEAM_BALLAS},
  147. {1953.389282, -1769.867553, 2081.389160, -1577.867553,TEAM_BALLAS},
  148. {1956.524169, -1577.875122, 2108.524169, -1465.875122,TEAM_BALLAS},
  149. {2108.523437, -1577.875366, 2212.523437, -1465.875366,TEAM_BALLAS},
  150. {1824.119140, -1462.211303, 2112.119140, -1302.211303,TEAM_BALLAS},
  151. {1828.438964, -1295.297973, 2108.438964, -1135.297973,TEAM_BALLAS},
  152. {2108.438964, -1295.297973, 2276.438964, -1135.297973,TEAM_BALLAS},
  153. {2108.438964, -1463.297973, 2276.438964, -1295.297973,TEAM_BALLAS},
  154. {1843.857055, -1135.044189, 2099.856933, -983.044189,TEAM_VAGOS},
  155. {2101.352783, -1133.549926, 2277.352783, -981.549926,TEAM_VAGOS},
  156. {1842.349365, -984.916809, 2282.349365, -912.916809,TEAM_VAGOS},
  157. {2283.451904, -1089.607421, 2667.451904, -897.607421,TEAM_VAGOS},
  158. {2462.997314, -1591.490600, 2630.997314, -1447.490600,TEAM_VAGOS},
  159. {2462.997314, -1447.490600, 2630.997314, -1279.490600,TEAM_VAGOS},
  160. {2275.657958, -1287.125976, 2467.657958, -1087.125976,TEAM_VAGOS},
  161. {2664.030273, -1087.785888, 2912.030273, -895.785888,TEAM_VAGOS},
  162. {2272.933349, -1527.671264, 2464.933349, -1287.671264,TEAM_VAGOS},
  163. {2657.655029, -1279.468505, 2913.655029, -1087.468505,TEAM_VAGOS},
  164. {2465.655029, -1279.468505, 2657.655029, -1087.468505,TEAM_VAGOS},
  165. {2630.737060, -1590.629394, 2958.737060, -1278.629394,TEAM_VAGOS},
  166. {1652.34375, -2167.96875, 1968.75, -1957.03125,TEAM_AZTECS},
  167. {1669.921875, -1962.890625, 1968.75, -1746.09375,TEAM_AZTECS},
  168. {1968.75, -2156.25, 2203.125, -1957.03125,TEAM_AZTECS},
  169. {1962.890625, -1957.03125, 2214.84375, -1757.8125,TEAM_AZTECS},
  170. {2378.90625, -2156.25, 2730.46875, -1921.875,TEAM_AZTECS},
  171. {1413.808, -1768.712, 1611.556, -1571.325,TEAM_SWAT},
  172. {1706.627, -2431.933, 2140.15, -2179.277,TEAM_SWAT}
  173. };
  174. new ZoneID[sizeof(ZoneInfo)];
  175.  
  176. new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
  177. new ZoneAttackTime[sizeof(ZoneInfo)];
  178.  
  179. new Teams[] = {
  180. TEAM_GROVE,
  181. TEAM_BALLAS,
  182. TEAM_VAGOS,
  183. TEAM_AZTECS,
  184. TEAM_SWAT
  185. };
  186.  
  187. new ZoneDeaths[sizeof(ZoneInfo)];
  188.  
  189. new String[256];
  190.  
  191. new gTeam[MAX_PLAYERS];
  192. new InDerby[MAX_PLAYERS];
  193. new InDM[MAX_PLAYERS];
  194. new Donor[MAX_PLAYERS];
  195. new InHouse[MAX_PLAYERS];
  196. new InTraining[MAX_PLAYERS];
  197. new Text:Rank;
  198. new Text:Rank1;
  199. new Text:Rank2;
  200. new Text:Rank3;
  201. new Text:Rank4;
  202. new Text:Rank5;
  203. new Text:Rank6;
  204. new Text:TeamGrove;
  205. new Text:TeamBallas;
  206. new Text:TeamVagos;
  207. new Text:TeamAztecs;
  208. new Scores[10];
  209. new mP[MAX_PLAYERS];
  210.  
  211. new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
  212. new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
  213.  
  214. playername(playerid)
  215. {
  216. new pName[MAX_PLAYER_NAME];
  217. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  218. return pName;
  219. }
  220.  
  221. stock UserPath(playerid)
  222. {
  223. new string[128],playername[MAX_PLAYER_NAME];
  224. GetPlayerName(playerid,playername,sizeof(playername));
  225. format(string,sizeof(string),PATH,playername);
  226. return string;
  227. }
  228.  
  229. stock udb_hash(buf[]) {
  230. new length=strlen(buf);
  231. new s1 = 1;
  232. new s2 = 0;
  233. new n;
  234. for (n=0; n<length; n++)
  235. {
  236. s1 = (s1 + buf[n]) % 65521;
  237. s2 = (s2 + s1) % 65521;
  238. }
  239. return (s2 << 16) + s1;
  240. }
  241.  
  242. stock GetTeamName ( TeamID )
  243. {
  244. new
  245. tName [ 64 ];
  246. //
  247.  
  248. switch( TeamID )
  249. {
  250. case TEAM_GROVE:
  251. {
  252. tName = "Groves";
  253. //
  254. }
  255.  
  256. case TEAM_BALLAS:
  257. {
  258. tName = "Ballas";
  259. //
  260. }
  261.  
  262. case TEAM_VAGOS:
  263. {
  264. tName = "Vegos";
  265. //
  266. }
  267.  
  268. case TEAM_SWAT:
  269. {
  270. tName = "Law";
  271. //
  272. }
  273.  
  274. case TEAM_AZTECS:
  275. {
  276. tName = "Aztecs";
  277. //
  278. }
  279.  
  280. case TEAM_ARMY:
  281. {
  282. tName = "Army";
  283. //
  284. }
  285.  
  286. default: //
  287. {
  288. tName = "Unknown";
  289. //
  290. }
  291. }
  292. return tName;
  293. }
  294.  
  295. stock Get1Name(playerid)
  296. {
  297. new
  298. pName[MAX_PLAYER_NAME];
  299.  
  300. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  301. return pName;
  302. }
  303.  
  304. stock GetWeaponModel(weaponid)
  305. {
  306. switch(weaponid)
  307. {
  308. case 1:
  309. return 331;
  310.  
  311. case 2..8:
  312. return weaponid+331;
  313.  
  314. case 9:
  315. return 341;
  316.  
  317. case 10..15:
  318. return weaponid+311;
  319.  
  320. case 16..18:
  321. return weaponid+326;
  322.  
  323. case 22..29:
  324. return weaponid+324;
  325.  
  326. case 30,31:
  327. return weaponid+325;
  328.  
  329. case 32:
  330. return 372;
  331.  
  332. case 33..45:
  333. return weaponid+324;
  334.  
  335. case 46:
  336. return 371;
  337. }
  338. return 0;
  339. }
  340.  
  341. public OnGameModeInit()
  342. {
  343.  
  344. SetTimer("ZoneTimer", 1000, true);
  345. SetTimer("ZoneTimerA", 1200, true);
  346. SetTimer("RankUpdater", 10000, true);
  347.  
  348. TeamGrove = TextDrawCreate(10.000000, 350.000000, "Team ~g~Grove : ~b~00");
  349. TextDrawBackgroundColor(TeamGrove, 255);
  350. TextDrawFont(TeamGrove, 0);
  351. TextDrawLetterSize(TeamGrove, 0.450000, 1.900000);
  352. TextDrawColor(TeamGrove, -1);
  353. TextDrawSetOutline(TeamGrove, 1);
  354. TextDrawSetProportional(TeamGrove, 1);
  355. TextDrawUseBox(TeamGrove, 0);
  356. TextDrawBoxColor(TeamGrove, 150);
  357. TextDrawTextSize(TeamGrove, 150.000000, 20.000000);
  358.  
  359. TeamBallas = TextDrawCreate(10.000000, 267.000000, "Team ~p~Ballas : ~b~00");
  360. TextDrawBackgroundColor(TeamBallas, 255);
  361. TextDrawFont(TeamBallas, 0);
  362. TextDrawLetterSize(TeamBallas, 0.450000, 1.900000);
  363. TextDrawColor(TeamBallas, -1);
  364. TextDrawSetOutline(TeamBallas, 1);
  365. TextDrawSetProportional(TeamBallas, 1);
  366. TextDrawUseBox(TeamBallas, 0);
  367. TextDrawBoxColor(TeamBallas, 150);
  368. TextDrawTextSize(TeamBallas, 150.000000, 20.000000);
  369.  
  370. TeamVagos = TextDrawCreate(10.000000, 299.000000, "Team ~y~Vagos : ~r~00");
  371. TextDrawBackgroundColor(TeamVagos, 255);
  372. TextDrawFont(TeamVagos, 0);
  373. TextDrawLetterSize(TeamVagos, 0.450000, 1.900000);
  374. TextDrawColor(TeamVagos, -1);
  375. TextDrawSetOutline(TeamVagos, 1);
  376. TextDrawSetProportional(TeamVagos, 1);
  377. TextDrawUseBox(TeamVagos, 0);
  378. TextDrawBoxColor(TeamVagos, 150);
  379. TextDrawTextSize(TeamVagos, 150.000000, 20.000000);
  380.  
  381. TeamAztecs = TextDrawCreate(10.000000, 322.000000, "Team ~b~Aztecs : ~r~00");
  382. TextDrawBackgroundColor(TeamAztecs, 255);
  383. TextDrawFont(TeamAztecs, 0);
  384. TextDrawLetterSize(TeamAztecs, 0.450000, 1.900000);
  385. TextDrawColor(TeamAztecs, -1);
  386. TextDrawSetOutline(TeamAztecs, 1);
  387. TextDrawSetProportional(TeamAztecs, 1);
  388. TextDrawUseBox(TeamAztecs, 0);
  389. TextDrawBoxColor(TeamAztecs, 150);
  390. TextDrawTextSize(TeamAztecs, 150.000000, 20.000000);
  391.  
  392.  
  393. Scores[TEAM_AZTECS] = Scores[TEAM_VAGOS] = Scores[TEAM_GROVE] = Scores[TEAM_BALLAS] = 0;
  394.  
  395.  
  396. Rank = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Rat");
  397. TextDrawBackgroundColor(Rank, 255);
  398. TextDrawFont(Rank, 1);
  399. TextDrawLetterSize(Rank, 0.450000, 1.900000);
  400. TextDrawColor(Rank, -1);
  401. TextDrawSetOutline(Rank, 1);
  402. TextDrawSetProportional(Rank, 1);
  403. TextDrawUseBox(Rank, 0);
  404. TextDrawBoxColor(Rank, 150);
  405. TextDrawTextSize(Rank, 150.000000, 20.000000);
  406.  
  407.  
  408. Rank1 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Killer");
  409. TextDrawBackgroundColor(Rank1, 255);
  410. TextDrawFont(Rank1, 1);
  411. TextDrawLetterSize(Rank1, 0.450000, 1.900000);
  412. TextDrawColor(Rank1, -1);
  413. TextDrawSetOutline(Rank1, 1);
  414. TextDrawSetProportional(Rank1, 1);
  415. TextDrawUseBox(Rank1, 0);
  416. TextDrawBoxColor(Rank1, 150);
  417. TextDrawTextSize(Rank1, 150.000000, 20.000000);
  418.  
  419.  
  420. Rank2 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Mob");
  421. TextDrawBackgroundColor(Rank2, 255);
  422. TextDrawFont(Rank2, 1);
  423. TextDrawLetterSize(Rank2, 0.450000, 1.900000);
  424. TextDrawColor(Rank2, -1);
  425. TextDrawSetOutline(Rank2, 1);
  426. TextDrawSetProportional(Rank2, 1);
  427. TextDrawUseBox(Rank2, 0);
  428. TextDrawBoxColor(Rank2, 150);
  429. TextDrawTextSize(Rank2, 150.000000, 20.000000);
  430.  
  431.  
  432. Rank3 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Ruler");
  433. TextDrawBackgroundColor(Rank3, 255);
  434. TextDrawFont(Rank3, 1);
  435. TextDrawLetterSize(Rank3, 0.450000, 1.900000);
  436. TextDrawColor(Rank3, -1);
  437. TextDrawSetOutline(Rank3, 1);
  438. TextDrawSetProportional(Rank3, 1);
  439. TextDrawUseBox(Rank3, 0);
  440. TextDrawBoxColor(Rank3, 150);
  441. TextDrawTextSize(Rank3, 150.000000, 20.000000);
  442.  
  443.  
  444. Rank4 = TextDrawCreate(10.000000, 120.000000, "~g~~g~Rank : ~b~War Hero");
  445. TextDrawBackgroundColor(Rank4, 255);
  446. TextDrawFont(Rank4, 1);
  447. TextDrawLetterSize(Rank4, 0.450000, 1.900000);
  448. TextDrawColor(Rank4, -1);
  449. TextDrawSetOutline(Rank4, 1);
  450. TextDrawSetProportional(Rank4, 1);
  451. TextDrawUseBox(Rank4, 0);
  452. TextDrawBoxColor(Rank4, 150);
  453. TextDrawTextSize(Rank4, 150.000000, 20.000000);
  454.  
  455.  
  456. Rank5 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~War Legend");
  457. TextDrawBackgroundColor(Rank5, 255);
  458. TextDrawFont(Rank5, 1);
  459. TextDrawLetterSize(Rank5, 0.450000, 1.900000);
  460. TextDrawColor(Rank5, -1);
  461. TextDrawSetOutline(Rank5, 1);
  462. TextDrawSetProportional(Rank5, 1);
  463. TextDrawUseBox(Rank5, 0);
  464. TextDrawBoxColor(Rank5, 150);
  465. TextDrawTextSize(Rank5, 150.000000, 20.000000);
  466.  
  467. Rank6 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Legendary Hero");
  468. TextDrawBackgroundColor(Rank6, 255);
  469. TextDrawFont(Rank6, 1);
  470. TextDrawLetterSize(Rank6, 0.450000, 1.900000);
  471. TextDrawColor(Rank6, -1);
  472. TextDrawSetOutline(Rank6, 1);
  473. TextDrawSetProportional(Rank6, 1);
  474. TextDrawUseBox(Rank6, 0);
  475. TextDrawBoxColor(Rank6, 150);
  476. TextDrawTextSize(Rank6, 150.000000, 20.000000);
  477.  
  478. //classe
  479. AddPlayerClass(105,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
  480. AddPlayerClass(106,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
  481. AddPlayerClass(107,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
  482. AddPlayerClass(103,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
  483. AddPlayerClass(104,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
  484. AddPlayerClass(102,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
  485. AddPlayerClass(108,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
  486. AddPlayerClass(109,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
  487. AddPlayerClass(110,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
  488. AddPlayerClass(285,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
  489. AddPlayerClass(286,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
  490. AddPlayerClass(280,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
  491. AddPlayerClass(114,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
  492. AddPlayerClass(115,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
  493. AddPlayerClass(116,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
  494. AddPlayerClass(105,1985.0214,-2238.5315,13.5469,330.5258,0,0,0,0,0,0); // AirForce
  495. AddPlayerClass(105,1985.0215,-2238.5315,13.5469,330.5258,0,0,0,0,0,0); // // Army
  496. for(new i=0; i < sizeof(ZoneInfo); i++)
  497. {
  498. ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX],ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
  499. }
  500. // Don't use these lines if it's a filterscript
  501. SetGameModeText("GangWar Beta v1.2.5");
  502. //pickup
  503. AddStaticPickup(362, 0, 2421.56, -1733.182, 15);
  504. //vehicles
  505. AddStaticVehicle(560,2507.5886,-1676.3402,13.2022,337.7339,202,92); // car
  506. AddStaticVehicle(560,2482.6841,-1654.1837,13.1309,87.7656,202,92); // car
  507. AddStaticVehicle(562,2474.3816,-1695.6672,13.1773,356.2812,202,78); // car
  508. AddStaticVehicle(522,2528.6885,-1665.3088,14.7386,89.4788,202,202); // car
  509. AddStaticVehicle(522,2528.3518,-1667.3475,14.7393,85.8760,202,202); // car
  510. AddStaticVehicle(522,2528.0334,-1669.8341,14.7418,91.0464,202,202); // car
  511. AddStaticVehicle(541,2526.6924,-1708.8540,13.1313,92.5936,202,202); // car
  512. AddStaticVehicle(541,2538.8040,-1716.9507,13.1798,180.5632,202,202); // car
  513. AddStaticVehicle(411,2525.7485,-1719.3511,13.2700,92.6054,202,202); // car
  514. AddStaticVehicle(411,2431.6394,-1636.3986,13.1749,359.4897,202,202); // car
  515. AddStaticVehicle(411,2007.0746,-1734.2866,13.2015,180.8459,18,116); // car
  516. AddStaticVehicle(560,1996.7081,-1688.0881,13.2063,0.0507,18,18); // car
  517. AddStaticVehicle(560,1978.0103,-1674.0729,15.7154,267.2123,18,18); // car
  518. AddStaticVehicle(562,2020.6190,-1677.3597,13.1198,270.4283,18,75); // car
  519. AddStaticVehicle(541,2042.4086,-1677.3103,13.1356,272.8734,18,0); // car
  520. AddStaticVehicle(541,2036.9230,-1748.1075,13.1350,89.3309,18,0); // car
  521. AddStaticVehicle(541,2570.8796,-1031.1039,69.2584,179.7895,6,63); // car
  522. AddStaticVehicle(541,2548.7893,-1052.7599,69.1902,267.0469,6,63); // car
  523. AddStaticVehicle(411,2511.4702,-1052.9198,69.1585,268.3543,6,73); // car
  524. AddStaticVehicle(411,2508.3660,-1033.5416,69.4506,183.1352,6,73); // car
  525. AddStaticVehicle(489,1989.0822,-2300.0315,13.6902,88.6343,25,106); // car
  526. AddStaticVehicle(489,2000.7072,-2240.5767,13.6904,86.3534,25,106); // car
  527. AddStaticVehicle(490,1999.4045,-2255.9519,13.6747,91.4669,25,106); // car
  528. AddStaticVehicle(490,1997.8685,-2250.8577,13.6721,88.5371,25,106); // car
  529. AddStaticVehicle(490,1999.3979,-2233.8108,13.6711,86.6122,25,106); // car
  530. AddStaticVehicle(541,1747.9828,-2092.8918,13.2244,179.9171,106,55); // car
  531. AddStaticVehicle(541,1725.3235,-2095.8909,13.2247,182.5599,106,55); // car
  532. AddStaticVehicle(541,1694.9573,-2094.4187,13.2217,182.2280,106,55); // car
  533. AddStaticVehicle(520,2530.5046,-1677.7228,20.8627,93.7480,72,40); // h
  534. AddStaticVehicle(447,2496.4182,-1657.6216,13.3742,91.9336,117,73); //
  535. AddStaticVehicle(560,2506.6797,-1694.9382,13.2598,1.5961,0,113); //
  536. AddStaticVehicle(560,2503.7720,-1695.0795,13.2632,0.3908,0,113); //
  537. AddStaticVehicle(411,2459.5313,-1671.4088,13.2268,359.4220,91,106); //
  538. AddStaticVehicle(425,2447.6138,-1672.2379,14.0496,0.1211,31,1); //
  539. AddStaticVehicle(432,2426.5759,-1673.5985,13.6451,3.8201,97,118); //
  540. AddStaticVehicle(432,2436.3132,-1673.4298,13.6396,359.3802,97,118); //
  541. AddStaticVehicle(432,2041.5450,-1738.0276,13.5553,182.6904,97,118); //
  542. AddStaticVehicle(432,2041.0107,-1696.5840,13.5591,359.6162,97,118); //
  543. AddStaticVehicle(432,2041.4635,-1628.2823,13.5553,359.6140,97,118); //
  544. AddStaticVehicle(432,2041.7928,-1658.1261,13.5552,178.0176,97,118); //
  545. AddStaticVehicle(560,1980.5566,-1691.7754,15.6693,271.0958,40,111); //
  546. AddStaticVehicle(560,1980.1891,-1710.1753,15.6744,271.2260,40,111); //
  547. AddStaticVehicle(411,1981.5153,-1727.9207,15.6901,271.5345,62,47); //
  548. AddStaticVehicle(520,2014.6522,-1771.7675,18.7248,3.5857,96,103); //
  549. AddStaticVehicle(425,2020.9589,-1729.4944,19.5695,115.3200,77,124); //
  550. AddStaticVehicle(425,2030.1608,-1681.1427,14.3210,356.0153,6,5); //
  551. AddStaticVehicle(425,2057.8347,-1681.1234,14.1360,1.1799,6,5); //
  552. AddStaticVehicle(520,2012.5592,-1688.7224,14.4809,84.2810,40,23); //
  553. AddStaticVehicle(411,2586.5154,-1032.8502,69.3051,178.4934,44,2); // inf
  554. AddStaticVehicle(560,2551.6379,-1029.8711,69.2804,175.9049,18,87); //
  555. AddStaticVehicle(560,2535.4463,-1031.2184,69.2855,177.4782,18,87); //
  556. AddStaticVehicle(560,2502.6873,-1031.7711,69.5081,174.0934,18,87); //
  557. AddStaticVehicle(432,2498.6394,-1056.6134,69.3297,355.8383,61,71); //
  558. AddStaticVehicle(432,2530.1560,-1064.5596,69.5754,0.6767,61,71); //
  559. AddStaticVehicle(432,2599.4087,-1067.2673,69.5879,359.2497,61,71); //
  560. AddStaticVehicle(432,2598.9290,-1098.6665,68.9029,359.6469,61,71); //
  561. AddStaticVehicle(432,1793.2164,-2135.0300,13.5542,357.8899,97,118); //
  562. AddStaticVehicle(432,1772.4653,-2095.4072,13.5563,180.5494,97,118); //
  563. AddStaticVehicle(432,1772.8739,-2130.2839,13.5541,1.7034,97,118); //
  564. AddStaticVehicle(411,1744.8118,-2127.6614,13.2740,0.9359,116,90); //
  565. AddStaticVehicle(411,1724.2477,-2128.0239,13.2819,1.4028,116,90); //
  566. AddStaticVehicle(560,1704.6345,-2128.2034,13.2529,359.3444,4,12); //
  567. AddStaticVehicle(560,1669.1509,-2115.0188,13.2522,269.7161,4,12); //
  568. AddStaticVehicle(560,1670.1851,-2111.1599,13.2517,269.9209,4,12); //
  569. AddStaticVehicle(432,1698.6498,-2085.4067,13.5542,181.5627,111,12); //
  570. AddStaticVehicle(425,1718.6141,-2143.2000,17.8035,0.9465,112,112); //
  571. AddStaticVehicle(425,1923.5332,-2242.4146,14.3758,184.8791,112,112); //
  572. AddStaticVehicle(425,1909.6245,-2242.1904,14.1007,191.8718,112,112); //
  573. AddStaticVehicle(520,1996.3632,-2345.7957,14.2697,90.9607,75,50); //
  574. AddStaticVehicle(520,1994.8959,-2360.0552,14.2668,94.4152,75,50); //
  575. AddStaticVehicle(548,1989.6368,-2312.3008,15.2358,93.3257,27,83); //
  576. AddStaticVehicle(548,1989.9620,-2325.8547,16.5614,94.2070,27,83); //
  577. AddStaticVehicle(476,1998.8616,-2289.2422,14.2541,96.1378,121,119); //
  578. AddStaticVehicle(476,1997.5930,-2272.0476,14.2564,95.1882,121,119); //
  579. AddStaticVehicle(528,1529.8984,-1688.1124,5.9330,272.5030,41,93); //
  580. AddStaticVehicle(528,1529.2792,-1683.6000,5.9312,270.6489,41,93); //
  581. AddStaticVehicle(528,1601.6564,-1692.0636,5.9339,92.5074,41,93); //
  582. AddStaticVehicle(596,1602.6875,-1683.8392,5.6076,89.8792,0,1); //
  583. AddStaticVehicle(596,1599.7533,-1700.1229,5.6117,89.6485,0,1); //
  584. AddStaticVehicle(601,1595.2601,-1710.1580,5.6489,358.3510,104,106); //
  585. AddStaticVehicle(599,1583.1615,-1709.1447,6.0801,358.1896,9,73); //
  586. AddStaticVehicle(599,1587.2540,-1710.3568,6.0854,357.7832,9,73); //
  587. AddStaticVehicle(490,1578.3622,-1710.7053,6.0170,0.5268,108,124); //
  588. AddStaticVehicle(432,1547.5939,-1613.5209,13.3901,271.0340,30,36); //
  589. AddStaticVehicle(432,1547.0203,-1605.4791,13.3901,271.1451,30,36); //
  590. AddStaticVehicle(432,1571.9551,-1610.5730,13.3901,180.9380,30,36); //
  591. AddStaticVehicle(432,1561.9154,-1611.9113,13.3901,178.7766,30,36); //
  592. return 1;
  593. }
  594.  
  595. public OnGameModeExit()
  596. {
  597. return 1;
  598. }
  599.  
  600. public OnPlayerRequestClass(playerid, classid)
  601. {
  602. switch(classid)
  603. {
  604. case 0:
  605. {
  606. GameTextForPlayer(playerid, "~g~Grove - ~w~Pistol-M4", 5000, 5);
  607. SetPlayerTeam(playerid, TEAM_GROVE);
  608. SetPlayerSkin(playerid,105);
  609. SetPlayerColor(playerid,COLOR_GROVES);
  610. GivePlayerWeapon(playerid,22,500);
  611. GivePlayerWeapon(playerid,31,500);
  612. SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
  613. SetPlayerFacingAngle(playerid, 66.7092);
  614. SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
  615. SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
  616. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  617. }
  618.  
  619. case 1:
  620. {
  621. SetPlayerTeam(playerid, TEAM_GROVE);
  622. SetPlayerSkin(playerid,106);
  623. GameTextForPlayer(playerid, "~g~Grove - Deagle-Shotgun", 5000, 5);
  624. SetPlayerColor(playerid,COLOR_GROVES);
  625. GivePlayerWeapon(playerid,24,500);
  626. GivePlayerWeapon(playerid,25,500);
  627. SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
  628. SetPlayerFacingAngle(playerid, 66.7092);
  629. SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
  630. SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
  631. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  632.  
  633. }
  634.  
  635. case 2:
  636. {
  637. SetPlayerTeam(playerid, TEAM_GROVE);
  638. SetPlayerSkin(playerid,107);
  639. SetPlayerColor(playerid,COLOR_GROVES);
  640. GameTextForPlayer(playerid, "~g~Grove - Sawnoff-Sniper", 5000, 5);
  641. SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
  642. GivePlayerWeapon(playerid,26,500);
  643. GivePlayerWeapon(playerid,34,500);
  644. SetPlayerFacingAngle(playerid, 66.7092);
  645. SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
  646. SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
  647. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  648.  
  649. }
  650.  
  651. case 3:
  652. {
  653.  
  654. SetPlayerTeam(playerid, TEAM_BALLAS);
  655. SetPlayerSkin(playerid,104);
  656. SetPlayerColor(playerid,COLOR_BALLA);
  657. GameTextForPlayer(playerid, "~p~Balla -Pistol-M4", 5000, 5);
  658. GivePlayerWeapon(playerid,22,500);
  659. GivePlayerWeapon(playerid,31,500);
  660. SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
  661. SetPlayerFacingAngle(playerid,145.0912);
  662. SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
  663. SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
  664. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  665.  
  666. }
  667.  
  668. case 4:
  669. {
  670. SetPlayerTeam(playerid, TEAM_BALLAS);
  671. SetPlayerSkin(playerid,103);
  672. SetPlayerColor(playerid,COLOR_BALLA);
  673. GameTextForPlayer(playerid, "~p~Balla - Ak-Deagle", 5000, 5);
  674. GivePlayerWeapon(playerid,24,500);
  675. GivePlayerWeapon(playerid,30,500);
  676. SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
  677. SetPlayerFacingAngle(playerid,145.0912);
  678. SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
  679. SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
  680. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  681.  
  682. }
  683.  
  684. case 5:
  685. {
  686. SetPlayerTeam(playerid, TEAM_BALLAS);
  687. SetPlayerSkin(playerid,102);
  688. SetPlayerColor(playerid,COLOR_BALLA);
  689. GameTextForPlayer(playerid, "~p~Balla - UZI-Rife ", 5000, 5);
  690. GivePlayerWeapon(playerid,28,500);
  691. GivePlayerWeapon(playerid,33,500);
  692. SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
  693. SetPlayerFacingAngle(playerid,145.0912);
  694. SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
  695. SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
  696. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  697.  
  698. }
  699.  
  700. case 6:
  701. {
  702.  
  703. SetPlayerTeam(playerid, TEAM_VAGOS);
  704. SetPlayerSkin(playerid,108);
  705. SetPlayerColor(playerid,COLOR_VEGOS);
  706. GameTextForPlayer(playerid, "~y~Vegos - pistol-M4", 5000, 5);
  707. GivePlayerWeapon(playerid,22,500);
  708. GivePlayerWeapon(playerid,31,500);
  709. SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
  710. SetPlayerFacingAngle(playerid,177.4599);
  711. SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
  712. SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
  713. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  714.  
  715. }
  716.  
  717. case 7:
  718. {
  719. SetPlayerTeam(playerid, TEAM_VAGOS);
  720. SetPlayerSkin(playerid,109);
  721. SetPlayerColor(playerid,COLOR_VEGOS);
  722. GameTextForPlayer(playerid, "~y~Vegos - Uzi-rifle", 5000, 5);
  723. GivePlayerWeapon(playerid,28,500);
  724. GivePlayerWeapon(playerid,33,500);
  725. SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
  726. SetPlayerFacingAngle(playerid,177.4599);
  727. SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
  728. SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
  729. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  730.  
  731. }
  732.  
  733. case 8:
  734. {
  735. SetPlayerTeam(playerid, TEAM_VAGOS);
  736. SetPlayerSkin(playerid,110);
  737. SetPlayerColor(playerid,COLOR_VEGOS);
  738. GameTextForPlayer(playerid, "~y~Vegos - ak-deagle", 5000, 5);
  739. GivePlayerWeapon(playerid,24,500);
  740. GivePlayerWeapon(playerid,30,500);
  741. SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
  742. SetPlayerFacingAngle(playerid,177.4599);
  743. SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
  744. SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
  745. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  746.  
  747. }
  748.  
  749. case 9:
  750. {
  751. SetPlayerTeam(playerid, TEAM_SWAT);
  752. SetPlayerSkin(playerid,285);
  753. SetPlayerColor(playerid,COLOR_BLUE);
  754. GameTextForPlayer(playerid, "~b~Law - shotgun-MP5", 5000, 5);
  755. GivePlayerWeapon(playerid,27,500);
  756. GivePlayerWeapon(playerid,39,500);
  757. SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
  758. SetPlayerFacingAngle(playerid,85.6765);
  759. SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
  760. SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
  761. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  762.  
  763. }
  764. case 10:
  765. {
  766. SetPlayerTeam(playerid, TEAM_SWAT);
  767. SetPlayerSkin(playerid,286);
  768. SetPlayerColor(playerid,COLOR_BLUE);
  769. GameTextForPlayer(playerid, "~b~Law M4-Silience", 5000, 5);
  770. GivePlayerWeapon(playerid,23,500);
  771. GivePlayerWeapon(playerid,31,500);
  772. SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
  773. SetPlayerFacingAngle(playerid,85.6765);
  774. SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
  775. SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
  776. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  777.  
  778. }
  779.  
  780. case 11:
  781. {
  782. SetPlayerTeam(playerid, TEAM_SWAT);
  783. SetPlayerSkin(playerid,280);
  784. SetPlayerColor(playerid,COLOR_BLUE);
  785. GameTextForPlayer(playerid, "~b~Law shotgun-m4", 5000, 5);
  786. GivePlayerWeapon(playerid,27,500);
  787. GivePlayerWeapon(playerid,31,500);
  788. SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
  789. SetPlayerFacingAngle(playerid,85.6765);
  790. SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
  791. SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
  792. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  793.  
  794. }
  795.  
  796. case 12:
  797. {
  798. SetPlayerTeam(playerid, TEAM_AZTECS);
  799. SetPlayerSkin(playerid,114);
  800. SetPlayerColor(playerid,COLOR_AZTECS);
  801. GivePlayerWeapon(playerid,28,500);
  802. GivePlayerWeapon(playerid,33,500);
  803. GameTextForPlayer(playerid, "~b~Aztecs - Uzi-rifle", 5000, 5);
  804. SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
  805. SetPlayerFacingAngle(playerid,357.3774);
  806. SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
  807. SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
  808. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  809.  
  810. }
  811.  
  812. case 13:
  813. {
  814. SetPlayerTeam(playerid, TEAM_AZTECS);
  815. SetPlayerSkin(playerid,115);
  816. SetPlayerColor(playerid,COLOR_AZTECS);
  817. GivePlayerWeapon(playerid,24,500);
  818. GivePlayerWeapon(playerid,31,500);
  819. GameTextForPlayer(playerid, "~b~AZTECS M4-Deagle", 5000, 5);
  820. SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
  821. SetPlayerFacingAngle(playerid,357.3774);
  822. SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
  823. SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
  824. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  825.  
  826. }
  827.  
  828. case 14:
  829. {
  830. SetPlayerTeam(playerid, TEAM_AZTECS);
  831. SetPlayerSkin(playerid,116);
  832. SetPlayerColor(playerid,COLOR_AZTECS);
  833. GameTextForPlayer(playerid, "~b~AZTECS- Psitol-ak", 5000, 5);
  834. GivePlayerWeapon(playerid,22,500);
  835. GivePlayerWeapon(playerid,30,500);
  836. SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
  837. SetPlayerFacingAngle(playerid,357.3774);
  838. SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
  839. SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
  840. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  841.  
  842. }
  843.  
  844. case 15:
  845. {
  846. SetPlayerTeam(playerid, TEAM_SWAT);
  847. SetPlayerSkin(playerid,61);
  848. SetPlayerColor(playerid,COLOR_BLUE);
  849. GameTextForPlayer(playerid, "~b~AirForce", 5000, 5);
  850. GivePlayerWeapon(playerid,22,500);
  851. SetPlayerPos(playerid, 1985.0214,-2238.5315,13.5469);
  852. SetPlayerFacingAngle(playerid,330.5258);
  853. SetPlayerCameraPos(playerid,1987.3593,-2234.7559,13.5469);
  854. SetPlayerCameraLookAt(playerid,1985.0214,-2238.5315,13.5469);
  855. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  856.  
  857. }
  858.  
  859. case 16:
  860. {
  861. SetPlayerTeam(playerid, TEAM_ARMY);
  862. SetPlayerSkin(playerid,287);
  863. SetPlayerColor(playerid,0x008C23FF);
  864. GameTextForPlayer(playerid, "~g~ARMY", 5000, 5);
  865. GivePlayerWeapon(playerid,27,500);
  866. GivePlayerWeapon(playerid,31,500);
  867. SetPlayerPos(playerid, 1985.0215,-2238.5315,13.5469);
  868. SetPlayerFacingAngle(playerid,330.5258);
  869. SetPlayerCameraPos(playerid,1987.3593,-2234.7559,13.5469);
  870. SetPlayerCameraLookAt(playerid,1985.0215,-2238.5315,13.5469);
  871. ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
  872. }
  873.  
  874. }
  875. return 1;
  876. }
  877.  
  878. public OnPlayerConnect(playerid)
  879. {
  880. SendClientMessage(playerid,COLOR_AZTECS,"Loading Please wait...");
  881. GameTextForPlayer(playerid, "Welcome to ~r~[sTs] ~b~Gang ~r~War", 5000, 5);
  882.  
  883. InDM[playerid] = 0;
  884.  
  885.  
  886. new pName[24];
  887. new str[128];
  888. GetPlayerName(playerid, pName, 24);
  889. format(str, 128, "%s has joined the server", pName);
  890. SendClientMessageToAll(0xAFAFAFAA, str);
  891.  
  892.  
  893. if(fexist(UserPath(playerid)))
  894. {
  895. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  896. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
  897. }
  898. else
  899. {
  900. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
  901. }
  902. return 1;
  903.  
  904. }
  905.  
  906. public OnPlayerDisconnect(playerid, reason)
  907. {
  908. new INI:File = INI_Open(UserPath(playerid));
  909. INI_SetTag(File,"data");
  910. INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
  911. INI_WriteInt(File,"Admin",PlayerInfo[playerid][Admin]);
  912. INI_WriteInt(File,"VIP",PlayerInfo[playerid][VIP]);
  913. INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
  914. INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
  915. INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
  916. INI_WriteInt(File,"Banned",PlayerInfo[playerid][Bans]);
  917. INI_Close(File);
  918. new pName[24];
  919. new str[128];
  920. GetPlayerName(playerid, pName, 24);
  921.  
  922. switch(reason)
  923. {
  924. case 0: format(str, 128, "%s has left. (Timeout)", pName);
  925. case 1: format(str, 128, "%s has left. (Leaving)", pName);
  926. case 2: format(str, 128, "%s has left. (Kicked)", pName);
  927. }
  928. SendClientMessageToAll(0xAFAFAFAA, str);
  929. return 1;
  930. }
  931.  
  932. new Float:DMSpawns[][4] = { // Random spawns so players won't spawn at the same place
  933.  
  934. {609.7040,-586.5684,17.2266,256.8267},
  935. {610.3588,-590.8182,17.2266,263.0453},
  936. {616.1186,-591.2390,17.2330,268.1367}
  937. //I will be using 3 you can add more if you want
  938. };
  939.  
  940. public OnPlayerSpawn(playerid)
  941. {
  942. if(InDM[playerid] == 1)//This will tell the script to respawn only the players that inside DM
  943. {
  944. SetPlayerInterior(playerid, 0); // We will set the interior to 0 (you can change it to your own DM)
  945. SetPlayerVirtualWorld(playerid, 10); // and we will make the Virtual World in different world, so we wont mix with other players
  946. new rand = random(sizeof(DMSpawns)); // DM Spawn
  947. SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);// we will set the player position at DM
  948. SetPlayerFacingAngle(playerid, DMSpawns[rand][3]); // Also facing Angle
  949. //and we will give him weapons, I will give 2 weapons
  950. GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
  951. GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun
  952. //you can edit them, or add more weapons
  953. }
  954.  
  955. for(new i=0;i<MAX_PLAYERS;i++)
  956. {
  957. if(gTeam[i] == TEAM_GROVE && gTeam[playerid] == TEAM_GROVE)
  958. {
  959. SetPlayerMarkerForPlayer(i, playerid, COLOR_GROVE);
  960. }
  961. if(gTeam[i] == TEAM_BALLAS && gTeam[playerid] == TEAM_BALLAS)
  962. {
  963. SetPlayerMarkerForPlayer(i, playerid, COLOR_BALLAS);
  964. }
  965. if(gTeam[i] == TEAM_VAGOS && gTeam[playerid] == TEAM_VAGOS)
  966. {
  967. SetPlayerMarkerForPlayer(i, playerid, COLOR_VEGOS);
  968. }
  969. if(gTeam[i] == TEAM_SWAT && gTeam[playerid] == TEAM_SWAT)
  970. {
  971. SetPlayerMarkerForPlayer(i, playerid, COLOR_BLUE);
  972. }
  973. if(gTeam[i] == TEAM_AZTECS && gTeam[playerid] == TEAM_AZTECS)
  974. {
  975. SetPlayerMarkerForPlayer(i, playerid, COLOR_AZTECS);
  976. }
  977. }
  978.  
  979. GetPlayerWeapon(playerid);
  980. ClearAnimations(playerid);
  981. PlayerPlaySound(playerid,1040,0, 0, 0);
  982.  
  983. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
  984. {
  985. SetPlayerHealth(playerid, 100);
  986. }
  987. if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 500)
  988. {
  989. SetPlayerHealth(playerid, 100);
  990. SetPlayerArmour(playerid, 20);
  991. }
  992. if (GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 1000)
  993. {
  994. SetPlayerHealth(playerid, 100);
  995. SetPlayerArmour(playerid, 50);
  996. }
  997. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  998. if (GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 2000)
  999. {
  1000. SetPlayerSkin(playerid,269);
  1001. SendClientMessage(playerid,COLOR_AZTECS,"You're Big Smoke");
  1002. GivePlayerWeapon(playerid,27,500);
  1003. GivePlayerWeapon(playerid,31,500);
  1004. GivePlayerWeapon(playerid,24,500);
  1005. SetPlayerHealth(playerid, 100);
  1006. SetPlayerArmour(playerid, 60);
  1007. }
  1008. if (GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3500)
  1009. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  1010. {
  1011. SetPlayerSkin(playerid,271);
  1012. GivePlayerWeapon(playerid,27,500);
  1013. GivePlayerWeapon(playerid,31,500);
  1014. GivePlayerWeapon(playerid,24,500);
  1015. SendClientMessage(playerid,COLOR_AZTECS,"You're Ryder");
  1016. SetPlayerHealth(playerid, 100);
  1017. SetPlayerArmour(playerid, 70);
  1018. }
  1019. if (GetPlayerScore(playerid) >= 3500 && GetPlayerScore(playerid) <= 8000)
  1020. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  1021. {
  1022. SetPlayerSkin(playerid,270);
  1023. GivePlayerWeapon(playerid,27,500);
  1024. GivePlayerWeapon(playerid,31,500);
  1025. GivePlayerWeapon(playerid,24,500);
  1026. SendClientMessage(playerid,COLOR_AZTECS,"You're Sweet");
  1027. SetPlayerHealth(playerid, 100);
  1028. SetPlayerArmour(playerid, 80);
  1029. }
  1030. if(GetPlayerScore(playerid) >= 10000)
  1031. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  1032. {
  1033. SetPlayerSkin(playerid,0);
  1034. GivePlayerWeapon(playerid,27,500);
  1035. GivePlayerWeapon(playerid,31,500);
  1036. GivePlayerWeapon(playerid,24,500);
  1037. SendClientMessage(playerid,COLOR_AZTECS,"You're CJ");
  1038. SetPlayerHealth(playerid, 100);
  1039. SetPlayerArmour(playerid, 100);
  1040. }
  1041. if(GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
  1042. if(GetPlayerTeam(playerid) == TEAM_AZTECS)
  1043. {
  1044. SetPlayerSkin(playerid,297);
  1045. GivePlayerWeapon(playerid,27,500);
  1046. GivePlayerWeapon(playerid,31,500);
  1047. GivePlayerWeapon(playerid,24,500);
  1048. SendClientMessage(playerid,COLOR_AZTECS,"You're Madd Dawg");
  1049. SetPlayerHealth(playerid, 100);
  1050. SetPlayerArmour(playerid, 100);
  1051. }
  1052. if(GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
  1053. if(GetPlayerTeam(playerid) == TEAM_BALLAS)
  1054. {
  1055. SetPlayerSkin(playerid,296);
  1056. GivePlayerWeapon(playerid,27,500);
  1057. GivePlayerWeapon(playerid,31,500);
  1058. GivePlayerWeapon(playerid,24,500);
  1059. SendClientMessage(playerid,COLOR_AZTECS,"You're Jizzy");
  1060. SetPlayerHealth(playerid, 100);
  1061. SetPlayerArmour(playerid, 100);
  1062. }
  1063. if(GetPlayerScore(playerid) >= 400)
  1064. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  1065. {
  1066. SetPlayerSkin(playerid,265);
  1067. GivePlayerWeapon(playerid,27,500);
  1068. GivePlayerWeapon(playerid,31,500);
  1069. GivePlayerWeapon(playerid,24,500);
  1070. SendClientMessage(playerid,COLOR_AZTECS,"You're Tenpenny");
  1071. SetPlayerHealth(playerid, 100);
  1072. SetPlayerArmour(playerid, 100);
  1073. }
  1074. if (GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) <= 700)
  1075. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  1076. {
  1077. SetPlayerSkin(playerid,294);
  1078. GivePlayerWeapon(playerid,27,500);
  1079. GivePlayerWeapon(playerid,31,500);
  1080. GivePlayerWeapon(playerid,24,500);
  1081. SendClientMessage(playerid,COLOR_AZTECS,"You're CAI");
  1082. SetPlayerHealth(playerid, 100);
  1083. SetPlayerArmour(playerid, 70);
  1084. }
  1085.  
  1086. if(GetPlayerSkin(playerid) == 105)
  1087. {
  1088. GivePlayerWeapon(playerid,22,500);
  1089. GivePlayerWeapon(playerid,31,500);
  1090. }
  1091. if(GetPlayerSkin(playerid) == 106)
  1092. {
  1093. GivePlayerWeapon(playerid,24,500);
  1094. GivePlayerWeapon(playerid,25,500);
  1095. }
  1096. if(GetPlayerSkin(playerid) == 107)
  1097. {
  1098. GivePlayerWeapon(playerid,26,500);
  1099. GivePlayerWeapon(playerid,34,500);
  1100. }
  1101. if(GetPlayerSkin(playerid) == 104)
  1102. {
  1103. GivePlayerWeapon(playerid,22,500);
  1104. GivePlayerWeapon(playerid,31,500);
  1105. }
  1106. if(GetPlayerSkin(playerid) == 103)
  1107. {
  1108. GivePlayerWeapon(playerid,24,500);
  1109. GivePlayerWeapon(playerid,30,500);
  1110. }
  1111. if(GetPlayerSkin(playerid) == 102)
  1112. {
  1113. GivePlayerWeapon(playerid,28,500);
  1114. GivePlayerWeapon(playerid,33,500);
  1115. }
  1116. if(GetPlayerSkin(playerid) == 108)
  1117. {
  1118. GivePlayerWeapon(playerid,22,500);
  1119. GivePlayerWeapon(playerid,31,500);
  1120. }
  1121. if(GetPlayerSkin(playerid) == 109)
  1122. {
  1123. GivePlayerWeapon(playerid,28,500);
  1124. GivePlayerWeapon(playerid,33,500);
  1125. }
  1126. if(GetPlayerSkin(playerid) == 110)
  1127. {
  1128. GivePlayerWeapon(playerid,24,500);
  1129. GivePlayerWeapon(playerid,30,500);
  1130. }
  1131. if(GetPlayerSkin(playerid) == 285)
  1132. {
  1133. GivePlayerWeapon(playerid,27,500);
  1134. GivePlayerWeapon(playerid,39,500);
  1135. }
  1136. if(GetPlayerSkin(playerid) == 286)
  1137. {
  1138. GivePlayerWeapon(playerid,23,500);
  1139. GivePlayerWeapon(playerid,31,500);
  1140. }
  1141. if(GetPlayerSkin(playerid) == 280)
  1142. {
  1143. GivePlayerWeapon(playerid,27,500);
  1144. GivePlayerWeapon(playerid,31,500);
  1145. }
  1146. if(GetPlayerSkin(playerid) == 114)
  1147. {
  1148. GivePlayerWeapon(playerid,28,500);
  1149. GivePlayerWeapon(playerid,33,500);
  1150. }
  1151. if(GetPlayerSkin(playerid) == 115)
  1152. {
  1153. GivePlayerWeapon(playerid,24,500);
  1154. GivePlayerWeapon(playerid,31,500);
  1155. }
  1156. if(GetPlayerSkin(playerid) == 116)
  1157. {
  1158. GivePlayerWeapon(playerid,22,500);
  1159. GivePlayerWeapon(playerid,30,500);
  1160. }
  1161. if(GetPlayerSkin(playerid) == 61)
  1162. {
  1163. GivePlayerWeapon(playerid,22,500);
  1164. }
  1165. if(GetPlayerSkin(playerid) == 287)
  1166. {
  1167. GivePlayerWeapon(playerid,27,500);
  1168. GivePlayerWeapon(playerid,31,500);
  1169. }
  1170.  
  1171. TextDrawShowForPlayer(playerid,TeamGrove);
  1172. TextDrawShowForPlayer(playerid,TeamBallas);
  1173. TextDrawShowForPlayer(playerid,TeamAztecs);
  1174. TextDrawShowForPlayer(playerid,TeamVagos);
  1175.  
  1176. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
  1177. {
  1178. TextDrawShowForPlayer(playerid,Rank);
  1179. }
  1180. if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 500)
  1181. {
  1182. TextDrawShowForPlayer(playerid,Rank1);
  1183. }
  1184. if (GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 1000)
  1185. {
  1186. TextDrawShowForPlayer(playerid,Rank2);
  1187. }
  1188. if (GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 2000)
  1189. {
  1190. TextDrawShowForPlayer(playerid,Rank3);
  1191. }
  1192. if (GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3500)
  1193. {
  1194. TextDrawShowForPlayer(playerid,Rank4);
  1195. }
  1196. if (GetPlayerScore(playerid) >= 3500 && GetPlayerScore(playerid) <= 8000)
  1197. {
  1198. TextDrawShowForPlayer(playerid,Rank5);
  1199. }
  1200. if (GetPlayerScore(playerid) >= 10000)
  1201. {
  1202. TextDrawShowForPlayer(playerid,Rank6);
  1203. }
  1204.  
  1205. for(new i=0; i < sizeof(ZoneInfo); i++)
  1206. {
  1207. GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
  1208. if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], 0xFF000055);
  1209. }
  1210. return 1;
  1211. }
  1212.  
  1213. stock GetTeamZoneColor(teamid)
  1214. {
  1215. switch(teamid)
  1216. {
  1217. case TEAM_GROVE: return 0x00800055;
  1218. case TEAM_BALLAS: return 0xA800A855;
  1219. case TEAM_VAGOS: return 0xD5D50055;
  1220. case TEAM_AZTECS: return 0x00A6A655;
  1221. case TEAM_SWAT: return 0x0000FF55;
  1222. }
  1223. return -1;
  1224. }
  1225.  
  1226. stock Zone(playerid, zoneid)
  1227. {
  1228. new Float:x, Float:y, Float:z;
  1229. GetPlayerPos(playerid, x, y, z);
  1230. return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
  1231. }
  1232.  
  1233. stock IsPlayerInZone(playerid, zoneid)
  1234. {
  1235. new Float:x, Float:y, Float:z;
  1236. GetPlayerPos(playerid, x, y, z);
  1237. return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
  1238. }
  1239.  
  1240. stock GetPlayersInZone(zoneid, teamid)
  1241. {
  1242. new count;
  1243. for(new i=0; i < MAX_PLAYERS; i++)
  1244. {
  1245. if(IsPlayerConnected(i) && GetPlayerTeam(i) == teamid && IsPlayerInZone(i, zoneid))
  1246. {
  1247. count++;
  1248. }
  1249. }
  1250. return count;
  1251. }
  1252.  
  1253. stock GetPlayerZone(playerid)
  1254. {
  1255. for(new i=0; i < sizeof(ZoneInfo); i++)
  1256. {
  1257. if(IsPlayerInZone(playerid, i))
  1258. {
  1259. return i;
  1260. }
  1261. }
  1262. return -1;
  1263. }
  1264.  
  1265. public OnPlayerDeath(playerid, killerid, reason)
  1266. {
  1267. for(new i=0; i < sizeof(ZoneInfo); i++)
  1268. for(new m=0; m<MAX_PLAYERS; m++)
  1269. {
  1270. if(IsPlayerConnected(killerid) && GetPlayerTeam(playerid) != GetPlayerTeam(killerid)) // not a suicide or team kill
  1271. {
  1272. new zoneid = GetPlayerZone(playerid);
  1273. if(zoneid != -1 && ZoneInfo[zoneid][zTeam] == GetPlayerTeam(playerid)) // zone member has been killed in the zone
  1274. {
  1275. ZoneDeaths[zoneid]++;
  1276. if(ZoneDeaths[zoneid] == MIN_DEATHS_TO_START_WAR)
  1277. {
  1278. new
  1279. tStrn [50];
  1280.  
  1281. format(tStrn, sizeof(tStrn), "~g~%s has been ~p~Provoked ~w~for a war by ~r~%s!!", GetTeamName(GetPlayerTeam(playerid)), GetTeamName(GetPlayerTeam(killerid)));
  1282. ZoneDeaths[zoneid] = 0;
  1283. ZoneAttacker[zoneid] = GetPlayerTeam(killerid);
  1284. ZoneAttackTime[zoneid] = 0;
  1285. GangZoneFlashForAll(ZoneID[zoneid], 0xFF000055);
  1286.  
  1287. new Float:x,Float:y,Float:z;
  1288. GetPlayerPos(killerid,x,y,z);
  1289.  
  1290. if(GetPlayerTeam(killerid) == TEAM_GROVE)
  1291. {
  1292. SetPlayerMapIcon(mP[m], 12, x,y,z, 62, 0, MAPICON_GLOBAL);
  1293. }
  1294. if(GetPlayerTeam(killerid) == TEAM_BALLAS)
  1295. {
  1296. SetPlayerMapIcon(mP[m], 12, x,y,z, 59, 0, MAPICON_GLOBAL);
  1297. }
  1298. if(GetPlayerTeam(killerid) == TEAM_VAGOS)
  1299. {
  1300. SetPlayerMapIcon(mP[m], 12, x,y,z, 60, 0, MAPICON_GLOBAL);
  1301. }
  1302. if(GetPlayerTeam(killerid) == TEAM_AZTECS)
  1303. {
  1304. SetPlayerMapIcon(mP[m], 12, x,y,z, 58, 0, MAPICON_GLOBAL);
  1305. }
  1306. if(GetPlayerTeam(killerid) == TEAM_SWAT)
  1307. {
  1308. SetPlayerMapIcon(mP[m], 12, x,y,z, 30, 0, MAPICON_GLOBAL);
  1309. }
  1310. }
  1311. }
  1312. }
  1313. }
  1314. PlayerInfo[killerid][Kills]++;
  1315. PlayerInfo[playerid][Deaths]++;
  1316.  
  1317. SendDeathMessage(killerid, playerid, reason);
  1318.  
  1319. new pName[24];
  1320. new string[128];
  1321.  
  1322. if(gTeam[killerid] == TEAM_GROVE) ++Scores[TEAM_GROVE];
  1323. if(gTeam[killerid] == TEAM_BALLAS) ++Scores[TEAM_BALLAS];
  1324. if(gTeam[killerid] == TEAM_VAGOS) ++Scores[TEAM_VAGOS];
  1325. if(gTeam[killerid] == TEAM_AZTECS) ++Scores[TEAM_AZTECS];
  1326. UpdateScore();
  1327.  
  1328. if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
  1329. {
  1330. GivePlayerMoney(killerid,5000);
  1331. GetPlayerName(playerid, pName, 24);
  1332. format(string, 128, " You Killed %s", pName);
  1333. SendClientMessage(playerid, COLOR_GREEN, string);
  1334. }
  1335. if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
  1336. {
  1337. GivePlayerMoney(playerid,-2000);
  1338. GetPlayerName(killerid, pName, 24);
  1339. format(string, 128, " %s Killed you", pName);
  1340. SendClientMessage(playerid, COLOR_RED, string);
  1341. }
  1342. return 1;
  1343. }
  1344.  
  1345. stock UpdateScore()
  1346. {
  1347. new str[20];
  1348. format(str,sizeof(str),"Team ~g~Grove : ~b~%d",Scores[TEAM_GROVE]);
  1349. TextDrawSetString(TeamGrove,str);
  1350. format(str,sizeof(str),"Team ~p~Ballas : ~b~%d",Scores[TEAM_BALLAS]);
  1351. TextDrawSetString(TeamBallas,str);
  1352. format(str,sizeof(str),"Team ~y~Vagos : ~r~%d",Scores[TEAM_VAGOS]);
  1353. TextDrawSetString(TeamVagos,str);
  1354. format(str,sizeof(str),"Team ~b~Aztecs : ~r~%d",Scores[TEAM_VAGOS]);
  1355. TextDrawSetString(TeamAztecs,str);
  1356. return 1;
  1357. }
  1358.  
  1359.  
  1360. public OnVehicleSpawn(vehicleid)
  1361. {
  1362. return 1;
  1363. }
  1364.  
  1365. public OnVehicleDeath(vehicleid, killerid)
  1366. {
  1367. return 1;
  1368. }
  1369.  
  1370. public OnPlayerText(playerid, text[])
  1371. {
  1372. if(text[0] == '!')
  1373. {
  1374. new string[128];
  1375. GetPlayerName(playerid, string, sizeof(string));
  1376. format(string, sizeof(string), "[Team Chat] %s: %s", string, text[1]);
  1377. for(new i = 0; i < MAX_PLAYERS; i++)
  1378. {
  1379. if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
  1380. }
  1381. return 0;
  1382. }
  1383. return 1;
  1384. }
  1385.  
  1386. public OnPlayerCommandText(playerid, cmdtext[])
  1387. {
  1388. return 0;
  1389. }
  1390.  
  1391. //===================================================================================
  1392. //Admin Commands
  1393. //===================================================================================
  1394. CMD:onduty(playerid, params[])
  1395. {
  1396. if(PlayerInfo[playerid][Admin] >= 1)
  1397. {
  1398. SetPlayerColor(playerid, COLOR_BRIGHTRED);
  1399. }
  1400. return 1;
  1401. }
  1402.  
  1403. CMD:offduty(playerid, params[])
  1404. {
  1405. if(PlayerInfo[playerid][Admin] >= 1)
  1406. {
  1407. SetPlayerColor(playerid, -1);
  1408. }
  1409. return 1;
  1410. }
  1411.  
  1412. CMD:setvip(playerid, params[])
  1413. {
  1414. new pID, value;
  1415. if(PlayerInfo[playerid][Admin] >= 3)
  1416. {
  1417. if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setvip (id) (level)");
  1418. else if(value < 0 || value > 3) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-3");
  1419. else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1420. else
  1421. {
  1422. new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
  1423. GetPlayerName(playerid, pName, sizeof(pName));
  1424. GetPlayerName(pID, target, sizeof(target));
  1425. format(string, sizeof(string), "You have set %s VIP level to %i", target, value);
  1426. SendClientMessage(playerid, COLOR_CYAN, string);
  1427. format(string, sizeof(string), "Your VIP level has been set to %i by %s", value, pName);
  1428. SendClientMessage(pID, COLOR_CYAN, string1);
  1429. PlayerInfo[pID][VIP] = value;
  1430. new INI:file = INI_Open(UserPath(pID));
  1431. INI_SetTag(file,"data");
  1432. INI_WriteInt(file,"VIP",PlayerInfo[pID][VIP]);
  1433. INI_Close(file);
  1434. }
  1435. }
  1436. else
  1437. {
  1438. return -1;
  1439. }
  1440. return 1;
  1441. }
  1442.  
  1443. CMD:setlevel(playerid, params[])
  1444. {
  1445. new pID, value;
  1446. if(PlayerInfo[playerid][Admin] == 3)
  1447. {
  1448. if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setlevel (id) (level)");
  1449. else if(value < 0 || value > 2) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-2");
  1450. else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1451. else
  1452. {
  1453. new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
  1454. GetPlayerName(playerid, pName, sizeof(pName));
  1455. GetPlayerName(pID, target, sizeof(target));
  1456. format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
  1457. SendClientMessage(playerid, COLOR_CYAN, string);
  1458. format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
  1459. SendClientMessage(pID, COLOR_CYAN, string1);
  1460. PlayerInfo[pID][Admin] = value;
  1461. new INI:file = INI_Open(UserPath(pID));
  1462. INI_SetTag(file,"data");
  1463. INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
  1464. INI_Close(file);
  1465. }
  1466. }
  1467. else if(PlayerInfo[playerid][Admin] == 4)
  1468. {
  1469. if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /sethlevel (id) (level)");
  1470. else if(value < 0 || value > 3) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-3");
  1471. else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1472. else
  1473. {
  1474. new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
  1475. GetPlayerName(playerid, pName, sizeof(pName));
  1476. GetPlayerName(pID, target, sizeof(target));
  1477. format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
  1478. SendClientMessage(playerid, COLOR_CYAN, string);
  1479. format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
  1480. SendClientMessage(pID, COLOR_CYAN, string1);
  1481. PlayerInfo[pID][Admin] = value;
  1482. new INI:file = INI_Open(UserPath(pID));
  1483. INI_SetTag(file,"data");
  1484. INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
  1485. INI_Close(file);
  1486. }
  1487. }
  1488. else if(PlayerInfo[playerid][Admin] == 5)
  1489. {
  1490. if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setahlevel (id) (level)");
  1491. else if(value < 0 || value > 4) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-4");
  1492. else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1493. else
  1494. {
  1495. new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
  1496. GetPlayerName(playerid, pName, sizeof(pName));
  1497. GetPlayerName(pID, target, sizeof(target));
  1498. format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
  1499. SendClientMessage(playerid, COLOR_CYAN, string);
  1500. format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
  1501. SendClientMessage(pID, COLOR_CYAN, string1);
  1502. PlayerInfo[pID][Admin] = value;
  1503. new INI:file = INI_Open(UserPath(pID));
  1504. INI_SetTag(file,"data");
  1505. INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
  1506. INI_Close(file);
  1507. }
  1508. }
  1509. else
  1510. {
  1511. return -1;
  1512. }
  1513. return 1;
  1514. }
  1515.  
  1516. CMD:rconlevel(playerid, params[])
  1517. {
  1518. new pID, value;
  1519. if(!IsPlayerAdmin(playerid)) return 0;
  1520. if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /rconlevel (id) (level)");
  1521. else if(value < 0 || value > 5) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-5");
  1522. else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1523. else
  1524. {
  1525. new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
  1526. GetPlayerName(playerid, pName, sizeof(pName));
  1527. GetPlayerName(pID, target, sizeof(target));
  1528. format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
  1529. SendClientMessage(playerid, COLOR_CYAN, string);
  1530. format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
  1531. SendClientMessage(pID, COLOR_CYAN, string1);
  1532. PlayerInfo[pID][Admin] = value;
  1533. new INI:file = INI_Open(UserPath(pID));
  1534. INI_SetTag(file,"data");
  1535. INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
  1536. INI_Close(file);
  1537. }
  1538. return 1;
  1539. }
  1540.  
  1541. CMD:kick(playerid, params[])
  1542. {
  1543. new id, reason[50], string[128], Kicked[MAX_PLAYER_NAME];
  1544. if(PlayerInfo[playerid][Admin] >= 1)
  1545. {
  1546. if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /kick [id/name][reason]");
  1547. else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1548. else if(id==playerid)return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not kick yourself!");
  1549. else if(PlayerInfo[id][Admin] >= 1) return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not kick another admin!");
  1550. else
  1551. {
  1552. GetPlayerName(id, Kicked, sizeof(Kicked));
  1553. format(string, sizeof(string), "%s has been kicked by Adminstrator %s(%d). reason: %s",Kicked, Get1Name(playerid) ,playerid, reason);
  1554. SendClientMessageToAll(COLOR_RED, string);
  1555. Kick(id);
  1556. }
  1557. }
  1558. else
  1559. {
  1560. return -1;
  1561. }
  1562. return 1;
  1563. }
  1564.  
  1565. CMD:ban(playerid, params[])
  1566. {
  1567. new id, reason[50], string[128], Kicked[MAX_PLAYER_NAME];
  1568. if(PlayerInfo[playerid][Admin] >= 1)
  1569. {
  1570. if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /ban [id/name][reason]");
  1571. else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1572. else if(id==playerid)return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not ban yourself!");
  1573. else if(PlayerInfo[id][Admin] >= 1) return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not ban another admin!");
  1574. else
  1575. {
  1576. GetPlayerName(id, Kicked, sizeof(Kicked));
  1577. format(string, sizeof(string), "%s has been Banned by Adminstrator %s(%d). reason: %s",Kicked, Get1Name(playerid) ,playerid, reason);
  1578. SendClientMessageToAll(COLOR_RED, string);
  1579. PlayerInfo[id][Bans] = 1;
  1580. new INI:file = INI_Open(UserPath(id));
  1581. INI_SetTag(file,"data");
  1582. INI_WriteInt(file,"Banned",PlayerInfo[id][Bans]);
  1583. INI_Close(file);
  1584. Kick(id);
  1585. }
  1586. }
  1587. else
  1588. {
  1589. return -1;
  1590. }
  1591. return 1;
  1592. }
  1593.  
  1594.  
  1595. CMD:spec(playerid, params[])
  1596. {
  1597. new id;
  1598. if(PlayerInfo[playerid][Admin] >= 1)
  1599. {
  1600. if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "Usage: /spec [id]");// Now this is where we use sscanf to check if the params were filled, if not we'll ask you to fill them
  1601. else if(id == playerid)return SendClientMessage(playerid,Grey,"You cannot spec yourself.");// Just making sure.
  1602. else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");// This is to ensure that you don't fill the param with an invalid player id.
  1603. else if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,"You are already specing someone.");// This will make you not automatically spec someone else by mistake.
  1604. GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// This is getting and saving the player's position in a variable so they'll respawn at the same place they typed '/spec'
  1605. Inter[playerid] = GetPlayerInterior(playerid);// Getting and saving the interior.
  1606. vWorld[playerid] = GetPlayerVirtualWorld(playerid);//Getting and saving the virtual world.
  1607. TogglePlayerSpectating(playerid, true);// Now before we use any of the 3 functions listed above, we need to use this one. It turns the spectating mode on.
  1608. if(IsPlayerInAnyVehicle(id))//Checking if the player is in a vehicle.
  1609. {
  1610. if(GetPlayerInterior(id) > 0)//If the player's interior is more than 0 (the default) then.....
  1611. {
  1612. SetPlayerInterior(playerid,GetPlayerInterior(id));//.....set the spectator's interior to that of the player being spectated.
  1613. }
  1614. if(GetPlayerVirtualWorld(id) > 0)//If the player's virtual world is more than 0 (the default) then.....
  1615. {
  1616. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));//.....set the spectator's virtual world to that of the player being spectated.
  1617. }
  1618. PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));// Now remember we checked if the player is in a vehicle, well if they're in a vehicle then we'll spec the vehicle.
  1619. }
  1620. else// If they're not in a vehicle, then we'll spec the player.
  1621. {
  1622. if(GetPlayerInterior(id) > 0)
  1623. {
  1624. SetPlayerInterior(playerid,GetPlayerInterior(id));
  1625. }
  1626. if(GetPlayerVirtualWorld(id) > 0)
  1627. {
  1628. SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  1629. }
  1630. PlayerSpectatePlayer(playerid,id);//
  1631. }
  1632. GetPlayerName(id, Name, sizeof(Name));//
  1633. format(String, sizeof(String),"You have started to spectate %s.",Name);//
  1634. SendClientMessage(playerid,0x0080C0FF,String);//
  1635. IsSpecing[playerid] = 1;//
  1636. IsBeingSpeced[id] = 1;//
  1637. spectatorid[playerid] = id;//
  1638. }
  1639. else
  1640. {
  1641. return -1;
  1642. }
  1643. return 1;
  1644. }
  1645.  
  1646. CMD:specoff(playerid, params[])
  1647. {
  1648. if(PlayerInfo[playerid][Admin] >= 1)
  1649. {//
  1650. if(IsSpecing[playerid] == 0) return SendClientMessage(playerid,Grey,"You are not spectating anyone.");
  1651. TogglePlayerSpectating(playerid, 0);
  1652. }
  1653. else
  1654. {
  1655. return -1;
  1656. }//
  1657. return 1;
  1658. }
  1659.  
  1660. CMD:v(playerid, params[])
  1661. {
  1662. if(PlayerInfo[playerid][Admin] >= 1)
  1663. {
  1664. new veh[24], color[2];
  1665. if(sscanf(params, "s[24]I(-1)I(-1)", veh, color[0], color[1])) return SendClientMessage(playerid, COLOR_CYAN, "[*] Usage: /v [vehicleid/name] [Optional: color 1] [Optional: color 2]");
  1666.  
  1667. new VehicleNames[212][] = {
  1668. {"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
  1669. {"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
  1670. {"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
  1671. {"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
  1672. {"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
  1673. {"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
  1674. {"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
  1675. {"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
  1676. {"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
  1677. {"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
  1678. {"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
  1679. {"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
  1680. {"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
  1681. {"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
  1682. {"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
  1683. {"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
  1684. {"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
  1685. {"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
  1686. {"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
  1687. {"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
  1688. {"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
  1689. {"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
  1690. {"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
  1691. {"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
  1692. {"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
  1693. {"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
  1694. {"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
  1695. {"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
  1696. {"Utility Trailer"}
  1697. }, vehicle = -1;
  1698.  
  1699. for(new v; v < 212; v++) if(strfind(VehicleNames[v], veh, true) != -1) { vehicle = v + 400; break; }
  1700. if(vehicle == -1) vehicle = strval(veh);
  1701. if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, -1, "[*] Enter a valid vehicle name or an ID between 400 and 611!");
  1702.  
  1703. new Float:Pos[4];
  1704. if(IsPlayerInAnyVehicle(playerid))
  1705. {
  1706. GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
  1707. GetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3]);
  1708. }
  1709. else
  1710. {
  1711. GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
  1712. GetPlayerFacingAngle(playerid, Pos[3]);
  1713. }
  1714. PutPlayerInVehicle(playerid, CreateVehicle(vehicle, Pos[0], Pos[1], Pos[2], Pos[3], color[0], color[1], 120), 0);
  1715. }
  1716. else
  1717. {
  1718. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1719. }
  1720. return 1;
  1721. }
  1722.  
  1723.  
  1724. COMMAND:freeze(playerid, params[])
  1725. {
  1726. if(PlayerInfo[playerid][Admin] >= 1)
  1727. {
  1728. new id;
  1729. if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /freeze [PlayerId/PartOfName]");
  1730. else
  1731. {
  1732. if(IsPlayerConnected(id))
  1733. {
  1734. new string[64];
  1735. new name8[MAX_PLAYER_NAME], Player8Name[MAX_PLAYER_NAME];
  1736. GetPlayerName(playerid, name8, sizeof(name8));
  1737. GetPlayerName(id, Player8Name, sizeof(Player8Name));
  1738. format(string, sizeof(string), "You have been frozen by Adminstrator %s", name8);
  1739. SendClientMessage(id, 0x0259EAAA, string);
  1740. format(string, sizeof(string), "You have frozen %s", Player8Name);
  1741. SendClientMessage(playerid, 0x0259EAAA, string);
  1742. TogglePlayerControllable(id, 0);
  1743. return 1;
  1744. }
  1745. else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1746. }
  1747. }
  1748. else
  1749. {
  1750. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1751. }
  1752. return 1;
  1753. }
  1754.  
  1755. COMMAND:unfreeze(playerid, params[])
  1756. {
  1757. if(PlayerInfo[playerid][Admin] >= 1)
  1758. {
  1759. new id;
  1760. if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /unfreeze [PlayerId/PartOfName]");
  1761. else
  1762. {
  1763. if(IsPlayerConnected(id))
  1764. {
  1765. new string[64];
  1766. new name7[MAX_PLAYER_NAME], Player7Name[MAX_PLAYER_NAME];
  1767. GetPlayerName(playerid, name7, sizeof(name7));
  1768. GetPlayerName(id, Player7Name, sizeof(Player7Name));
  1769. format(string, sizeof(string), "You have been unfrozen by Adminstrator %s", name7);
  1770. SendClientMessage(id, 0x0259EAAA, string);
  1771. format(string, sizeof(string), "You have unfrozen %s", Player7Name);
  1772. SendClientMessage(playerid, 0x0259EAAA, string);
  1773. TogglePlayerControllable(id, 1);
  1774. return 1;
  1775. }
  1776. else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1777. }
  1778. }
  1779. else
  1780. {
  1781. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1782. }
  1783. return 1;
  1784. }
  1785.  
  1786.  
  1787. CMD:goto(playerid,params[])
  1788. {
  1789. new id;
  1790. new string85[128];
  1791. new Float:x,Float:y,Float:z;
  1792. new nameme1[MAX_PLAYER_NAME];
  1793. if(PlayerInfo[playerid][Admin] >= 1)
  1794. {
  1795. if(sscanf(params,"u",id)) SendClientMessage(playerid, 0xAA3333AA, "/goto [id]");
  1796. {
  1797. if(IsPlayerConnected(id))
  1798. {
  1799. GetPlayerName(id, nameme1, MAX_PLAYER_NAME);
  1800. GetPlayerPos(id,x,y,z);
  1801. SetPlayerPos(playerid,x,y,z);
  1802. format(string85,sizeof(string85),"You've Teleported to %s",nameme1);
  1803. SendClientMessage(playerid, 0xAA333AA, string85);
  1804. }
  1805. else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1806. }
  1807. }
  1808. else
  1809. {
  1810. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1811. }
  1812. return 1;
  1813. }
  1814.  
  1815. CMD:get(playerid,params[])
  1816. {
  1817. new id;
  1818. new string85[128];
  1819. new Float:x,Float:y,Float:z;
  1820. new nameme1[MAX_PLAYER_NAME];
  1821. if(PlayerInfo[playerid][Admin] >= 1)
  1822. {
  1823. if(sscanf(params,"u",id)) SendClientMessage(playerid, 0xAA3333AA, "/get [id]");
  1824. {
  1825. if(IsPlayerConnected(id))
  1826. {
  1827. GetPlayerName(id, nameme1, MAX_PLAYER_NAME);
  1828. GetPlayerPos(playerid,x,y,z);
  1829. SetPlayerPos(id,x,y,z);
  1830. format(string85,sizeof(string85),"You've Teleported %s to you",nameme1);
  1831. SendClientMessage(playerid, 0xAA333AA, string85);
  1832. }
  1833. else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
  1834. }
  1835. }
  1836. else
  1837. {
  1838. return -1;
  1839. }
  1840. return 1;
  1841. }
  1842.  
  1843. COMMAND:sethp(playerid, cmdtext[])
  1844. {
  1845. if(PlayerInfo[playerid][Admin] >= 2)
  1846. {
  1847. new Target,Amount;
  1848. if(!sscanf(cmdtext,"ui", Target, Amount))
  1849. {
  1850. if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
  1851. else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
  1852. SetPlayerHealth(Target, Amount);
  1853. SendClientMessage(playerid, COLOR_CYAN, "Target id health set");
  1854. }
  1855. else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(sh)sethp [playerid] [health] :: Function Will Set Specific Amount of Health for player");
  1856. }
  1857. else
  1858. {
  1859. return -1;
  1860. }
  1861. return 1;
  1862. }
  1863.  
  1864. COMMAND:sh(playerid, params[])
  1865. {
  1866. return cmd_sethp(playerid, params);
  1867. }
  1868.  
  1869. COMMAND:setarmor(playerid, cmdtext[])
  1870. {
  1871. if(PlayerInfo[playerid][Admin] >= 2)
  1872. {
  1873. new Target,Amount;
  1874. if(!sscanf(cmdtext,"ui", Target, Amount))
  1875. {
  1876. if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
  1877. else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
  1878. SetPlayerArmour(Target, Amount);
  1879. SendClientMessage(playerid, COLOR_CYAN, "Target id armor set");
  1880. }
  1881. else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(sa)setarmor [playerid] [armour] :: Function Will Set Specific Amount of Armour for player");
  1882. }
  1883. else
  1884. {
  1885. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1886. }
  1887. return 1;
  1888. }
  1889.  
  1890. COMMAND:sa(playerid, params[])
  1891. {
  1892. return cmd_setarmor(playerid, params);
  1893. }
  1894.  
  1895. CMD:giveweapon(playerid,params[])
  1896. {
  1897. if(PlayerInfo[playerid][Admin] >= 2)
  1898. {
  1899. new pid, wid, amt;
  1900. if(sscanf(params, "uii", pid,wid,amt)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(gw)giveweapon [playerid] [weaponid] [amount]");
  1901. else if(wid < 0 || wid >40) return SendClientMessage(playerid,COLOR_CYAN,"ERROR: Invalid weaponid");
  1902. else if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
  1903. else
  1904. {
  1905. if(PlayerInfo[playerid][Admin] >= 2)
  1906. {
  1907. GivePlayerWeapon(pid,wid,amt);
  1908. SendClientMessage(playerid, COLOR_CYAN, "Target id Recived the weapon");
  1909. }
  1910. else
  1911. {
  1912. return -1;
  1913. }
  1914. }
  1915. }
  1916. else
  1917. {
  1918. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
  1919. }
  1920. return 1;
  1921. }
  1922.  
  1923. CMD:gw(playerid, params[])
  1924. {
  1925. return cmd_giveweapon(playerid, params);
  1926. }
  1927.  
  1928. COMMAND:givescore(playerid, cmdtext[])
  1929. {
  1930. if(PlayerInfo[playerid][Admin] >= 2)
  1931. {
  1932. new Target,Amount;
  1933. if(!sscanf(cmdtext,"ui", Target, Amount))
  1934. {
  1935. if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
  1936. else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
  1937. SetPlayerScore(Target, GetPlayerScore(Target) + Amount);
  1938. SendClientMessage(playerid, COLOR_CYAN, "Target id Score Recived");
  1939. }
  1940. else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /givescore[playerid] [armour] :: Function Will give Specific Amount of Score to player");
  1941. }
  1942. else
  1943. {
  1944. return -1;
  1945. }
  1946. return 1;
  1947. }
  1948.  
  1949. //=========================================================================================
  1950.  
  1951.  
  1952. //===================================================================================
  1953. //Vip Commands
  1954. //====================================================================================
  1955. CMD:jp(playerid,params[])
  1956. {
  1957. if(PlayerInfo[playerid][VIP] >= 1)
  1958. {
  1959. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
  1960. }
  1961. else
  1962. {
  1963. return -1;
  1964. }
  1965. return 1;
  1966. }
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981. //===================================================================
  1982.  
  1983. CMD:admins(playerid, params[])
  1984. {
  1985. foreach(Player, i)
  1986. {
  1987. new level[128], string[128];
  1988.  
  1989. if(PlayerInfo[i][Admin] > 0)
  1990. {
  1991. if(sscanf(params, "u", i))
  1992. {
  1993. switch(PlayerInfo[i][Admin])
  1994. {
  1995. case 1: level = ""adminlevel1"";
  1996. case 2: level = ""adminlevel2"";
  1997. case 3: level = ""adminlevel3"";
  1998. case 4: level = ""adminlevel4"";
  1999. case 5: level = ""adminlevel5"";
  2000. }
  2001. format(string, sizeof(string), "%s: %s(%d)", level, playername(i), i);
  2002. SendClientMessage(playerid, COLOR_CYAN, string);
  2003. }
  2004. }
  2005. else
  2006. {
  2007. SendClientMessage(playerid, COLOR_CYAN, "There is currently no admin present at this time but we still got an eye on you");
  2008. }
  2009. }
  2010. return 1;
  2011. }
  2012.  
  2013. CMD:order(playerid,params[])
  2014. {
  2015. new reason[50], string[128];
  2016. if(GetPlayerScore(playerid) == 3500)
  2017. {
  2018. if(sscanf(params, "s",reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /order [Command]");
  2019. else
  2020. {
  2021. format(string, sizeof(string), "Senior %s Has Ordered : %s ",playerid, reason);
  2022. for(new i = 0; i < MAX_PLAYERS; i++)
  2023. {
  2024. if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, COLOR_RED, string);
  2025. }
  2026. }
  2027. }
  2028. else
  2029. {
  2030. SendClientMessage(playerid, COLOR_RED, "You need to be a high level Pal to use this command : least 3500 Score");
  2031. }
  2032. return 1;
  2033. }
  2034.  
  2035.  
  2036.  
  2037. CMD:locate(playerid,params[])
  2038. {
  2039. new targetid; //the player we will locate
  2040. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /Locate [Part of Name/Player ID]"); // this defines as /Gps [id]
  2041. if(IsPlayerConnected(targetid)) //to check if is player connected or not
  2042. {
  2043. new Float:x, Float:y, Float:z; // code to detect player position
  2044. GetPlayerPos(playerid, x, y, z); // ^
  2045. SetPlayerMapIcon(playerid, 13, x, y, z, 62, 0, MAPICON_GLOBAL); // set a map icon for player , 12 is define as objectid, and 62 define as map icon
  2046. SendClientMessage(playerid,COLOR_GREEN,"Last Time he was at that location, /lrem to stop the tracker");
  2047. TogglePlayerControllable(playerid, 0);
  2048. }
  2049. return 1;
  2050. }
  2051.  
  2052. CMD:lrem(playerid,params[])
  2053. {
  2054. RemovePlayerMapIcon(playerid, 13); // to rem player map icon
  2055. TogglePlayerControllable(playerid, 1);
  2056. return 1;
  2057. }
  2058.  
  2059. CMD:acmd(playerid,params[])
  2060. {
  2061. ShowPlayerDialog(playerid, 12516, DIALOG_STYLE_MSGBOX,"{FFFF00}Admin Commands","{FFF000}/setdonor,/remdonor \n{F235FF}/kick,/ban,/warn\n{00FF32}/car,/sethealth,/setarmour,/goto, etc()","Okay","");
  2062. return 1;
  2063. }
  2064.  
  2065.  
  2066. CMD:setdonor(playerid,params[])
  2067. {
  2068. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
  2069. new ID;
  2070. new pn[MAX_PLAYER_NAME];
  2071. new an[MAX_PLAYER_NAME];
  2072. new str[128];
  2073. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setdonor [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
  2074. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
  2075. GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
  2076. GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
  2077. Donor[playerid] = 1;
  2078. format(str, sizeof(str), "You set %s as a Donor", pn); //Showed before, this is the line that give the message to playerid)
  2079. SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
  2080. return 1;
  2081. }
  2082.  
  2083. CMD:remdonor(playerid,params[])
  2084. {
  2085. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
  2086. new ID;
  2087. new pn[MAX_PLAYER_NAME];
  2088. new an[MAX_PLAYER_NAME];
  2089. new str[128];
  2090. if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /remdonor [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
  2091. if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
  2092. GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
  2093. GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
  2094. Donor[playerid] = 0;
  2095. format(str, sizeof(str), "You remove %s from Donor ship", pn); //Showed before, this is the line that give the message to playerid)
  2096. SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
  2097. return 1;
  2098. }
  2099.  
  2100. CMD:exit(playerid, params[])
  2101. {
  2102. if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
  2103. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  2104. {
  2105. SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
  2106. SetPlayerInterior(playerid, 0);
  2107. InHouse[playerid] = 0;
  2108. }
  2109. if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
  2110. if(GetPlayerTeam(playerid) == TEAM_BALLAS)
  2111. {
  2112. SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
  2113. SetPlayerInterior(playerid, 0);
  2114. InHouse[playerid] = 0;
  2115. }
  2116. if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
  2117. if(GetPlayerTeam(playerid) == TEAM_VAGOS)
  2118. {
  2119. SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
  2120. SetPlayerInterior(playerid, 0);
  2121. InHouse[playerid] = 0;
  2122. }
  2123. if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
  2124. if(GetPlayerTeam(playerid) == TEAM_AZTECS)
  2125. {
  2126. SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
  2127. SetPlayerInterior(playerid, 0);
  2128. InHouse[playerid] = 0;
  2129. }
  2130. return 1;
  2131. }
  2132.  
  2133. CMD:enter(playerid,params[])
  2134. {
  2135. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2136. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2522.8372,-1679.4862,15.4970))
  2137. {
  2138. SetPlayerInterior(playerid, 3);
  2139. SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
  2140. InHouse[playerid] = 1;
  2141. }
  2142.  
  2143. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2144. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2524.3279,-1658.8173,15.4935))
  2145. {
  2146. SetPlayerInterior(playerid, 2);
  2147. SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
  2148. InHouse[playerid] = 1;
  2149. }
  2150.  
  2151. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2152. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2513.5056,-1650.0386,14.3557))
  2153. {
  2154. SetPlayerInterior(playerid, 1);
  2155. SetPlayerPos(playerid, 223.043991,1289.259888,1082.199951);
  2156. InHouse[playerid] = 1;
  2157. }
  2158.  
  2159. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2160. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2498.6497,-1643.5905,13.7826))
  2161. {
  2162. SetPlayerInterior(playerid, 7);
  2163. SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
  2164. InHouse[playerid] = 1;
  2165. }
  2166.  
  2167. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2168. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2486.2517,-1644.5336,14.0772))
  2169. {
  2170. SetPlayerInterior(playerid, 2);
  2171. SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
  2172. InHouse[playerid] = 1;
  2173. }
  2174.  
  2175. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2176. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2468.9958,-1647.2377,13.5182))
  2177. {
  2178. SetPlayerInterior(playerid, 1);
  2179. SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
  2180. InHouse[playerid] = 1;
  2181. }
  2182.  
  2183. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2184. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2014.8019,-1732.6581,14.2344))
  2185. {
  2186. SetPlayerInterior(playerid,19);
  2187. SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
  2188. InHouse[playerid] = 1;
  2189. }
  2190.  
  2191. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2192. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2016.0077,-1717.3259,14.0968))
  2193. {
  2194. SetPlayerInterior(playerid, 3);
  2195. SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
  2196. InHouse[playerid] = 1;
  2197. }
  2198.  
  2199. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2200. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2018.2424,-1703.6433,14.2344))
  2201. {
  2202. SetPlayerInterior(playerid, 2);
  2203. SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
  2204. InHouse[playerid] = 1;
  2205. }
  2206.  
  2207. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2208. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1980.6772,-1719.3282,17.0308))
  2209. {
  2210. SetPlayerInterior(playerid, 1);
  2211. SetPlayerPos(playerid, 223.043991,1289.259888,1082.199956);
  2212. InHouse[playerid] = 1;
  2213. }
  2214.  
  2215. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2216. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1973.0618,-1705.7380,15.9688))
  2217. {
  2218. SetPlayerInterior(playerid, 7);
  2219. SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
  2220. InHouse[playerid] = 1;
  2221. }
  2222.  
  2223. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2224. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1980.9927,-1682.6611,17.0535))
  2225. {
  2226. SetPlayerInterior(playerid, 2);
  2227. SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
  2228. InHouse[playerid] = 1;
  2229. }
  2230.  
  2231. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2232. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2526.9668,-1034.3342,69.5795))
  2233. {
  2234. SetPlayerInterior(playerid, 1);
  2235. SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
  2236. InHouse[playerid] = 1;
  2237. }
  2238.  
  2239. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2240. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2628.3418,-1067.6791,69.6122))
  2241. {
  2242. SetPlayerInterior(playerid, 9);
  2243. SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
  2244. InHouse[playerid] = 1;
  2245. }
  2246.  
  2247. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2248. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2534.4414,-1062.6346,69.5662))
  2249. {
  2250. SetPlayerInterior(playerid, 3);
  2251. SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
  2252. InHouse[playerid] = 1;
  2253. }
  2254.  
  2255. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2256. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2018.2424,-1703.6433,14.2344))
  2257. {
  2258. SetPlayerInterior(playerid, 2);
  2259. SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
  2260. InHouse[playerid] = 1;
  2261. }
  2262.  
  2263. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2264. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2534.4414,-1062.6346,69.5662))
  2265. {
  2266. SetPlayerInterior(playerid, 1);
  2267. SetPlayerPos(playerid, 223.043991,1289.259888,1082.199956);
  2268. InHouse[playerid] = 1;
  2269. }
  2270.  
  2271. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2272. if(IsPlayerInRangeOfPoint(playerid, 7.0, 2526.1941,-1061.2209,69.9708))
  2273. {
  2274. SetPlayerInterior(playerid, 7);
  2275. SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
  2276. InHouse[playerid] = 1;
  2277. }
  2278.  
  2279. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2280. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1755.5990,-2118.5598,13.5543))
  2281. {
  2282. SetPlayerInterior(playerid, 2);
  2283. SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
  2284. InHouse[playerid] = 1;
  2285. }
  2286.  
  2287. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2288. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1714.4561,-2125.2808,14.0566))
  2289. {
  2290. SetPlayerInterior(playerid, 1);
  2291. SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
  2292. InHouse[playerid] = 1;
  2293. }
  2294.  
  2295. if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
  2296. if(IsPlayerInRangeOfPoint(playerid, 7.0, 1712.0077,-2101.3975,14.0210))
  2297. {
  2298. SetPlayerInterior(playerid, 9);
  2299. SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
  2300. InHouse[playerid] = 1;
  2301. }
  2302. return 1;
  2303. }
  2304.  
  2305. CMD:cuff(playerid, params[])
  2306. {
  2307. new targetid;
  2308. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /cuff [Part of Name/Player ID]");
  2309. if(IsPlayerConnected(targetid))
  2310. {
  2311. new Float:x, Float:y, Float:z;
  2312. GetPlayerPos(playerid, x, y, z);
  2313. if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
  2314. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2315. {
  2316. new str[512];
  2317. new name[MAX_PLAYER_NAME];
  2318. GetPlayerName(playerid, name, sizeof(name));
  2319. new target[MAX_PLAYER_NAME];
  2320. GetPlayerName(targetid, target, sizeof(target));
  2321. format(str, sizeof(str), "INFO: You have cuffed %s!",target);
  2322. SendClientMessage(playerid, 0xE01B1B, str);
  2323. format(str, sizeof(str), "WARNING: You have been cuffed by %s!",name);
  2324. SendClientMessage(targetid, 0xE01B1B, str);
  2325. SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);//this will set the object cuffs at the hand of the player you want to cuff.
  2326. SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
  2327. return 1;
  2328. }
  2329.  
  2330. }
  2331. return 1;
  2332. }
  2333.  
  2334. CMD:uncuff(playerid, params[])
  2335. {
  2336. new targetid;
  2337. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /uncuff [Part of Name/Player ID]");
  2338. if(IsPlayerConnected(targetid))
  2339. {
  2340. new Float:x, Float:y, Float:z;
  2341. GetPlayerPos(playerid, x, y, z);
  2342. if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
  2343. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2344. {
  2345. if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000))return SendClientMessage(playerid,-1,"ERROR: The player is not cuffed!");
  2346. SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NONE);
  2347. new str[512];
  2348. new name[MAX_PLAYER_NAME];
  2349. GetPlayerName(playerid, name, sizeof(name));
  2350. new target[MAX_PLAYER_NAME];
  2351. GetPlayerName(targetid, target, sizeof(target));
  2352. format(str, sizeof(str), "INFO: You have uncuffed %s!",target);
  2353. SendClientMessage(playerid, 0xE01B1B, str);
  2354. format(str, sizeof(str), "WARNING: You have been uncuffed by %s!",name);
  2355. SendClientMessage(targetid, 0xE01B1B, str);
  2356. return 1;
  2357. }
  2358.  
  2359. }
  2360. return 1;
  2361. }
  2362.  
  2363. CMD:sms(playerid, params[])
  2364. {
  2365. new id, string[128], string2[128], sender[MAX_PLAYER_NAME], reciever[MAX_PLAYER_NAME];
  2366. if(sscanf(params, "us[75]", id, params[2])) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /pm <id> <message>");
  2367. GetPlayerName(playerid, sender, sizeof(sender));
  2368. GetPlayerName(id, reciever, sizeof(reciever));
  2369. format(string, sizeof(string), "sms from %s: %s", sender, params[2]);
  2370. format(string2, sizeof(string2), "sms to %s: %s", reciever, params[2]);
  2371. SendClientMessage(id, COLOR_YELLOW, string);
  2372. SendClientMessage(playerid, COLOR_YELLOW, string2);
  2373. return 1;
  2374. }
  2375.  
  2376. CMD:spyballa(playerid,params[])
  2377. {
  2378. if (GetPlayerScore(playerid) == 2000)
  2379. {
  2380. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2381. {
  2382. SetPlayerColor(playerid,COLOR_BALLAS);
  2383. SetPlayerSkin(playerid,103);
  2384. SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
  2385. }
  2386. else
  2387. {
  2388. SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
  2389. }
  2390. }
  2391. return 1;
  2392. }
  2393.  
  2394. CMD:spygrove(playerid,params[])
  2395. {
  2396. if (GetPlayerScore(playerid) == 2000)
  2397. {
  2398. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2399. {
  2400. SetPlayerColor(playerid,COLOR_GROVE);
  2401. SetPlayerSkin(playerid,105);
  2402.  
  2403. SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
  2404. }
  2405. else
  2406. {
  2407. SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
  2408. }
  2409. }
  2410. return 1;
  2411. }
  2412.  
  2413. CMD:spyaztecs(playerid,params[])
  2414. {
  2415. if (GetPlayerScore(playerid) == 2000)
  2416. {
  2417. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2418. {
  2419. SetPlayerColor(playerid,COLOR_AZTECS);
  2420. SetPlayerSkin(playerid,114);
  2421.  
  2422. SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
  2423. }
  2424. else
  2425. {
  2426. SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
  2427. }
  2428. }
  2429. return 1;
  2430. }
  2431.  
  2432. CMD:spyvagos(playerid,params[])
  2433. {
  2434. if (GetPlayerScore(playerid) == 2000)
  2435. {
  2436. if(GetPlayerTeam(playerid) == TEAM_SWAT)
  2437. {
  2438. SetPlayerColor(playerid,COLOR_VEGOS);
  2439. SetPlayerSkin(playerid,108);
  2440.  
  2441. SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
  2442. }
  2443. else
  2444. {
  2445. SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
  2446. }
  2447. }
  2448. return 1;
  2449. }
  2450.  
  2451. CMD:ranks(playerid, params[])
  2452. {
  2453. SendClientMessage(playerid,COLOR_CYAN,"Rank 1 - 100 scores, Rank 2 - 500 Scores, Rank 3 - 1000 Scores, Rank 4 - 2000 Scores, Rank 5 - 3500 Scores, Rank 6 - 8000 Scores, Rank 9 - 10000 Scores");
  2454. return 1;
  2455. }
  2456.  
  2457. CMD:training(playerid,params[])
  2458. {
  2459. if(InTraining[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"YOu are already in training, /leavetraining to leave it");
  2460. SetPlayerPos(playerid, 548.8602, 71.06725, 2580.811);
  2461. GetPlayerWeapon(playerid);
  2462. GivePlayerWeapon(playerid,24,1000);
  2463. GivePlayerWeapon(playerid,25,1000);
  2464. GivePlayerWeapon(playerid,29,1000);
  2465. GivePlayerWeapon(playerid,31,1000);
  2466. SetPlayerArmour(playerid, 1000);
  2467. InTraining[playerid] = 1;
  2468. return 1;
  2469. }
  2470.  
  2471. CMD:dm(playerid,params[])
  2472. {
  2473. new PlayerName[MAX_PLAYER_NAME];//Player name
  2474. GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  2475. if(InDM[playerid] == 0)//if the player is not in DM
  2476. {//then
  2477. InDM[playerid] = 1; // Now we will set him in DM so he will respawn at DM
  2478. SendClientMessage(playerid, COLOR_LIGHTBLUE , "You have joined /dm, to leave type /dm again");//Message to tell him that he joined DM
  2479. format(String, sizeof(String), "Server:{FFFFFF}%s(%d) has joined DM(/dm)", PlayerName, playerid);
  2480. SendClientMessageToAll(COLOR_LIGHTBLUE, String);//Message to tell everyone that he joined DM
  2481. SetPlayerInterior(playerid, 0); // Just like we did before we will set he's interior to 0
  2482. SetPlayerVirtualWorld(playerid, 10); // and same here Virtual World to 10
  2483. new rand = random(sizeof(DMSpawns)); // DM Spawn
  2484. SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);// we will set the player position at DM
  2485. SetPlayerFacingAngle(playerid, DMSpawns[rand][3]); // Also facing Angle
  2486. //and we will give him weapons, I will give 2 weapons
  2487. GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
  2488. GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun
  2489. //you can edit them, or add more weapons if you want
  2490. }
  2491. else
  2492. {//if the player is already in DM, he will leave
  2493. InDM[playerid] = 0; //So now we will set him as not in DM
  2494. SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have left /dm to join again type /dm");//We will send him a message to tell him that he left
  2495. SpawnPlayer(playerid);//We will spawn the player now
  2496. SetPlayerHealth(playerid, 100);//set he's health to 100
  2497. ResetPlayerWeapons(playerid);// and reset he's weapons
  2498. SetPlayerVirtualWorld(playerid, 0);//we will set he's virtual world to 0
  2499. SetPlayerInterior(playerid, 0);//also interior to 0
  2500. }
  2501. return 1;
  2502. }
  2503.  
  2504. CMD:leavetraining(playerid,params[])
  2505. {
  2506. if(InDerby[playerid] == 0) return SendClientMessage(playerid,COLOR_GREEN,"You are not in training depot!");
  2507. InDerby[playerid] = 0;
  2508. SetPlayerHealth(playerid,0);
  2509. return 1;
  2510. }
  2511.  
  2512. CMD:unlockall(playerid,params[])
  2513. {
  2514. if(IsPlayerAdmin(playerid)) SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
  2515. return 1;
  2516. }
  2517.  
  2518. CMD:getweapon(playerid,params[])
  2519. {
  2520. SendClientMessage(playerid,COLOR_RED,"you need to be In Ammunation");
  2521. return 1;
  2522. }
  2523.  
  2524. CMD:drunk(playerid,params[])
  2525. {
  2526. ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1 ,1,1,1,1);
  2527. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2528. return 1;
  2529. }
  2530.  
  2531. CMD:aim(playerid,params[])
  2532. {
  2533. ApplyAnimation(playerid,"PED","SHP_1H_Lift",4.1,1,1 ,1,1,1,1);
  2534. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2535. return 1;
  2536. }
  2537.  
  2538. CMD:cover(playerid,params[])
  2539. {
  2540. ApplyAnimation(playerid,"PED","gnstwall_injurd",4.1,1,1 ,1,1,1,1);
  2541. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2542. return 1;
  2543. }
  2544.  
  2545. CMD:cover1(playerid,params[])
  2546. {
  2547. ApplyAnimation(playerid,"PED","JMP_Wall1m_180",4.1,1,1 ,1,1,1,1);
  2548. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2549. return 1;
  2550. }
  2551.  
  2552. CMD:cover2(playerid,params[])
  2553. {
  2554. ApplyAnimation(playerid,"PED","Rail_fall_crawl",4.1,1,1 ,1,1,1,1);
  2555. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2556. return 1;
  2557. }
  2558.  
  2559. CMD:breach1(playerid,params[])
  2560. {
  2561. ApplyAnimation(playerid,"PED","swt_breach_01",4.1,1,1 ,1,1,1,1);
  2562. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2563. return 1;
  2564. }
  2565.  
  2566. CMD:breach2(playerid,params[])
  2567. {
  2568. ApplyAnimation(playerid,"PED","swt_breach_02",4.1,1,1 ,1,1,1,1);
  2569. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2570. return 1;
  2571. }
  2572.  
  2573. CMD:breach3(playerid,params[])
  2574. {
  2575. ApplyAnimation(playerid,"PED","swt_breach_03",4.1,1,1 ,1,1,1,1);
  2576. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2577. return 1;
  2578. }
  2579.  
  2580. CMD:snipe(playerid,params[])
  2581. {
  2582. ApplyAnimation(playerid,"PED","WEAPON_sniper",4.1,1,1 ,1,1,1,1);
  2583. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2584. return 1;
  2585. }
  2586.  
  2587. CMD:getguns(playerid,params[])
  2588. {
  2589. ApplyAnimation(playerid,"PED","CAT_Safe_Rob",4.1,1,1 ,1,1,1,1);
  2590. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2591. return 1;
  2592. }
  2593.  
  2594. CMD:angry(playerid,params[])
  2595. {
  2596. ApplyAnimation(playerid,"PED","RIOT_ANGRY",4.1,1,1 ,1,1,1,1);
  2597. SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
  2598. return 1;
  2599. }
  2600.  
  2601. CMD:stopanim(playerid,params[])
  2602. {
  2603. ClearAnimations(playerid);
  2604. SendClientMessage(playerid, 0xFFFF00AA, "Animations cleared!");
  2605. return 1;
  2606. }
  2607.  
  2608. CMD:kill(playerid,params[])
  2609. {
  2610. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2611. SendClientMessage(playerid,COLOR_RED,"You have commited suecide");
  2612. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2613. SetPlayerHealth(playerid,0);
  2614. return 1;
  2615. }
  2616.  
  2617. CMD:acmds(playerid,params[])
  2618. {
  2619. ShowPlayerDialog(playerid, 23123,DIALOG_STYLE_LIST, "Admin Commands:", "/onduty \n/offduty \n/kick \n/ban \n/giveweapon \n/freeze \n/unfreeze \n/spec \n/specoff\n/goto\n/get\n/v", "Ok", "Cancel");
  2620. return 1;
  2621. }
  2622.  
  2623. CMD:missions(playerid,Params[])
  2624. {
  2625. ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Missions",""COL_GREEN"You are to capture gangzones, recruit members and bring the war to your enemies or capture enemy Weapon van and bring it to your base for scores!","Ok","");
  2626. return 1;
  2627. }
  2628.  
  2629. CMD:rules(playerid,Params[])
  2630. {
  2631. ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Rules",""COL_GREEN"*Respect Admins and Players\n*Do not use cleo mods or hacks\n*Do not c-bug\n*Do not team-kill\n*Do not provoke or flame others\n*Be mature and act maturely","Ok","");
  2632. return 1;
  2633. }
  2634.  
  2635. CMD:help(playerid,Params[])
  2636. {
  2637. ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Help:", "/commands\n/Missions\n/Rules \n/animhelp \n/dms \n/turfhelp \n/gangs \n/animhelp \n/rcdms \n/training \n/pm\n/spyhelp", "Ok", "Cancel");
  2638. return 1;
  2639. }
  2640.  
  2641.  
  2642. CMD:spyhelp(playerid,Params[])
  2643. {
  2644. SendClientMessage(playerid,COLOR_GREEN,"//=================================================//");
  2645. SendClientMessage(playerid,COLOR_RED,"use /spy(name of the gang) to spy in their hood, in order to break their defences and steal their important info as well as their weapon crate, you must have least 3500 score to do it so.");
  2646. SendClientMessage(playerid,COLOR_GREEN,"//===================================================//");
  2647. return 1;
  2648. }
  2649.  
  2650. CMD:animhelp(playerid,Params[])
  2651. {
  2652. ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Here are the Anims", "/drunk \n/cover1-3 \n/breach1-3 \n/aim \n/snipe\n//getguns\n/stopanim", "Ok", "Cancel");
  2653. return 1;
  2654. }
  2655.  
  2656. CMD:commands(playerid,Params[])
  2657. {
  2658. SendClientMessage(playerid,COLOR_GREEN,"//=================================================//");
  2659. SendClientMessage(playerid,COLOR_RED,"/getweapon, /dm1, /dm2, /dm3, /dm4 to 7, /rcdm1 to 4, /kill, /help etc");
  2660. SendClientMessage(playerid,COLOR_GREEN,"//===================================================//");
  2661. return 1;
  2662. }
  2663.  
  2664. CMD:dms(playerid,Params[])
  2665. {
  2666. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2667. SendClientMessage(playerid,COLOR_RED,"Getting bored with turf war,");
  2668. SendClientMessage(playerid,COLOR_RED,"then type /DM1,2,3,5,6,7 and enjoy");
  2669. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2670. return 1;
  2671. }
  2672.  
  2673. CMD:rcdms(playerid,Params[])
  2674. {
  2675. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2676. SendClientMessage(playerid,COLOR_RED,"Getting bored with turf war,");
  2677. SendClientMessage(playerid,COLOR_RED,"then type /rcdm1,2,3,4 and enjoy");
  2678. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2679. return 1;
  2680. }
  2681.  
  2682. CMD:turfhelp(playerid,Params[])
  2683. {
  2684. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2685. SendClientMessage(playerid,COLOR_RED,"There 2 methods to start turf war");
  2686. SendClientMessage(playerid,COLOR_RED,"One is to get 5 homies and go on");
  2687. SendClientMessage(playerid,COLOR_RED,"Rival gang turf, it will start the turf");
  2688. SendClientMessage(playerid,COLOR_RED,"Or Kill at least 5 rivals to start turf");
  2689. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2690. return 1;
  2691. }
  2692.  
  2693. CMD:gangs(playerid,Params[])
  2694. {
  2695. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2696. SendClientMessage(playerid,COLOR_RED,"There are plenty of gangs");
  2697. SendClientMessage(playerid,COLOR_RED,"Grove");
  2698. SendClientMessage(playerid,COLOR_RED,"Ballas");
  2699. SendClientMessage(playerid,COLOR_RED,"Vagos");
  2700. SendClientMessage(playerid,COLOR_RED,"Aztecs");
  2701. SendClientMessage(playerid,COLOR_RED,"Law(not a gang) as well as AirForce");
  2702. SendClientMessage(playerid,COLOR_GREEN,"//====================//");
  2703. return 1;
  2704. }
  2705.  
  2706. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  2707. {
  2708. return 1;
  2709. }
  2710.  
  2711. public OnPlayerExitVehicle(playerid, vehicleid)
  2712. {
  2713. return 1;
  2714. }
  2715.  
  2716. public OnPlayerStateChange(playerid, newstate, oldstate)
  2717. {
  2718. if(newstate == 2)
  2719. {
  2720. if(GetPlayerVehicleID(playerid) == 520)
  2721. {
  2722. if (GetPlayerScore(playerid) >= 300)
  2723. {
  2724. SendClientMessage(playerid,COLOR_RED,"Server: Please do not rape players by that much");
  2725. }
  2726. else
  2727. {
  2728. RemovePlayerFromVehicle(playerid);
  2729. SendClientMessage(playerid,COLOR_RED,"Server: You need more score to drive this!");
  2730. }
  2731. }
  2732. else if(GetPlayerVehicleID(playerid) == 432)
  2733. {
  2734. if (GetPlayerScore(playerid) >= 300)
  2735. {
  2736. SendClientMessage(playerid,COLOR_RED,"Server: Please do not rape players by that much");
  2737. }
  2738. else
  2739. {
  2740. RemovePlayerFromVehicle(playerid);
  2741. SendClientMessage(playerid,COLOR_RED,"Server: You need more score to drive this!");
  2742. }
  2743. }
  2744. }
  2745. return 1;
  2746. }
  2747.  
  2748. public OnPlayerEnterCheckpoint(playerid)
  2749. {
  2750. return 1;
  2751. }
  2752.  
  2753. public OnPlayerLeaveCheckpoint(playerid)
  2754. {
  2755. return 1;
  2756. }
  2757.  
  2758. public OnPlayerEnterRaceCheckpoint(playerid)
  2759. {
  2760. return 1;
  2761. }
  2762.  
  2763. public OnPlayerLeaveRaceCheckpoint(playerid)
  2764. {
  2765. return 1;
  2766. }
  2767.  
  2768. public OnRconCommand(cmd[])
  2769. {
  2770. return 1;
  2771. }
  2772.  
  2773. public OnPlayerRequestSpawn(playerid)
  2774. {
  2775. return 1;
  2776. }
  2777.  
  2778. public OnObjectMoved(objectid)
  2779. {
  2780. return 1;
  2781. }
  2782.  
  2783. public OnPlayerObjectMoved(playerid, objectid)
  2784. {
  2785. return 1;
  2786. }
  2787.  
  2788. public OnPlayerPickUpPickup(playerid, pickupid)
  2789. {
  2790. CreatePickup(362, 0, 2421.56, -1733.182, 15);
  2791. return 1;
  2792. }
  2793.  
  2794. public OnVehicleMod(playerid, vehicleid, componentid)
  2795. {
  2796. return 1;
  2797. }
  2798.  
  2799. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  2800. {
  2801. return 1;
  2802. }
  2803.  
  2804. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  2805. {
  2806. return 1;
  2807. }
  2808.  
  2809. public OnPlayerSelectedMenuRow(playerid, row)
  2810. {
  2811. return 1;
  2812. }
  2813.  
  2814. public OnPlayerExitedMenu(playerid)
  2815. {
  2816. return 1;
  2817. }
  2818.  
  2819. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  2820. {
  2821. return 1;
  2822. }
  2823.  
  2824. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2825. {
  2826. return 1;
  2827. }
  2828.  
  2829. public OnRconLoginAttempt(ip[], password[], success)
  2830. {
  2831. return 1;
  2832. }
  2833.  
  2834. public OnPlayerUpdate(playerid)
  2835. {
  2836. if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
  2837. new
  2838. weaponid[13],weaponammo[13],pArmedWeapon;
  2839. pArmedWeapon = GetPlayerWeapon(playerid);
  2840. GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
  2841. GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
  2842. GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
  2843. GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
  2844. #if ARMEDBODY_USE_HEAVY_WEAPON
  2845. GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
  2846. #endif
  2847. if(weaponid[1] && weaponammo[1] > 0){
  2848. if(pArmedWeapon != weaponid[1]){
  2849. if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2850. SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2851. }
  2852. }
  2853. else {
  2854. if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2855. RemovePlayerAttachedObject(playerid,0);
  2856. }
  2857. }
  2858. }
  2859. else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
  2860. RemovePlayerAttachedObject(playerid,0);
  2861. }
  2862. if(weaponid[2] && weaponammo[2] > 0){
  2863. if(pArmedWeapon != weaponid[2]){
  2864. if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2865. SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2866. }
  2867. }
  2868. else {
  2869. if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2870. RemovePlayerAttachedObject(playerid,1);
  2871. }
  2872. }
  2873. }
  2874. else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
  2875. RemovePlayerAttachedObject(playerid,1);
  2876. }
  2877. if(weaponid[4] && weaponammo[4] > 0){
  2878. if(pArmedWeapon != weaponid[4]){
  2879. if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2880. SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2881. }
  2882. }
  2883. else {
  2884. if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2885. RemovePlayerAttachedObject(playerid,2);
  2886. }
  2887. }
  2888. }
  2889. else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
  2890. RemovePlayerAttachedObject(playerid,2);
  2891. }
  2892. if(weaponid[5] && weaponammo[5] > 0){
  2893. if(pArmedWeapon != weaponid[5]){
  2894. if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2895. SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
  2896. }
  2897. }
  2898. else {
  2899. if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2900. RemovePlayerAttachedObject(playerid,3);
  2901. }
  2902. }
  2903. }
  2904. else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
  2905. RemovePlayerAttachedObject(playerid,3);
  2906. }
  2907. #if ARMEDBODY_USE_HEAVY_WEAPON
  2908. if(weaponid[7] && weaponammo[7] > 0){
  2909. if(pArmedWeapon != weaponid[7]){
  2910. if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2911. SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
  2912. }
  2913. }
  2914. else {
  2915. if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2916. RemovePlayerAttachedObject(playerid,4);
  2917. }
  2918. }
  2919. }
  2920. else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
  2921. RemovePlayerAttachedObject(playerid,4);
  2922. }
  2923. #endif
  2924. armedbody_pTick[playerid] = GetTickCount();
  2925. }
  2926. return true;
  2927. }
  2928.  
  2929. public OnPlayerStreamIn(playerid, forplayerid)
  2930. {
  2931. return 1;
  2932. }
  2933.  
  2934. public OnPlayerStreamOut(playerid, forplayerid)
  2935. {
  2936. return 1;
  2937. }
  2938.  
  2939. public OnVehicleStreamIn(vehicleid, forplayerid)
  2940. {
  2941. return 1;
  2942. }
  2943.  
  2944. public OnVehicleStreamOut(vehicleid, forplayerid)
  2945. {
  2946. return 1;
  2947. }
  2948.  
  2949. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2950. {
  2951. switch( dialogid )
  2952. {
  2953. case DIALOG_REGISTER:
  2954. {
  2955. if (!response) return Kick(playerid);
  2956. if(response)
  2957. {
  2958. GivePlayerMoney(playerid,10000);
  2959. new hashpass[129];
  2960. WP_Hash(hashpass,sizeof(hashpass),inputtext);
  2961. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
  2962. new INI:File = INI_Open(UserPath(playerid));
  2963. INI_SetTag(File,"data");
  2964. INI_WriteString(File,"Password",hashpass);
  2965. INI_WriteInt(File,"Cash",10000);
  2966. INI_WriteInt(File,"Admin",0);
  2967. INI_WriteInt(File,"VIP",0);
  2968. INI_WriteInt(File,"Kills",0);
  2969. INI_WriteInt(File,"Deaths",0);
  2970. INI_WriteInt(File,"Scores",0);
  2971. INI_WriteInt(File,"Banned",0);
  2972. INI_Close(File);
  2973.  
  2974. SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
  2975. SpawnPlayer(playerid);
  2976. ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
  2977. }
  2978. }
  2979.  
  2980. case DIALOG_LOGIN:
  2981. {
  2982. if ( !response ) return Kick ( playerid );
  2983. if( response )
  2984. {
  2985. new hashpass[129];
  2986. WP_Hash(hashpass,sizeof(hashpass),inputtext);
  2987. if(!strcmp(hashpass,PlayerInfo[playerid][Pass]))
  2988. {
  2989. if(PlayerInfo[playerid][Bans] == 1)
  2990. {
  2991. SendClientMessage(playerid, COLOR_BRIGHTRED,"Account is Banned, please visit at website for ban appeal");
  2992. }
  2993. else
  2994. {
  2995. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  2996. GivePlayerMoney(playerid, PlayerInfo[playerid][Cash]);
  2997. SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
  2998. ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
  2999. }
  3000. }
  3001. else
  3002. {
  3003. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
  3004. }
  3005. return 1;
  3006. }
  3007. }
  3008. }
  3009. return 1;
  3010. }
  3011.  
  3012.  
  3013. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  3014. {
  3015. return 1;
  3016. }
  3017.  
  3018. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  3019. {
  3020. PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
  3021.  
  3022. if(issuerid != INVALID_PLAYER_ID)
  3023. {
  3024. if(GetPlayerTeam(issuerid) == GetPlayerTeam(playerid))
  3025. {
  3026. GameTextForPlayer(issuerid, "Do not ~r~~n~Team Attack", 5000, 5);
  3027. TogglePlayerControllable(issuerid, 0);
  3028. SetTimerEx("un_freeze", 300, 0, "d", issuerid);
  3029. }
  3030. }
  3031. return 1;
  3032. }
  3033.  
  3034. forward un_freeze(playerid);
  3035. public un_freeze(playerid)
  3036. {
  3037. TogglePlayerControllable(playerid, 1);
  3038. return 1;
  3039. }
  3040.  
  3041. public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
  3042. {
  3043. return 1;
  3044. }
  3045.  
  3046. public ForEachTimer()
  3047. {
  3048. return 1;
  3049. }
  3050.  
  3051. public ZoneTimer(playerid)
  3052. {
  3053. for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
  3054. {
  3055. if(ZoneAttacker[i] != -1) // zone is being attacked
  3056. {
  3057. if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
  3058. {
  3059. ZoneAttackTime[i]++;
  3060. if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
  3061. {
  3062. new
  3063. tStra [50];
  3064.  
  3065. format(tStra, sizeof(tStra), "~g~%s ~w~gang has ~p~lost ~p~its Zone ~w~to ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
  3066. GameTextForPlayer(playerid, tStra, 3000, 6);
  3067. GangZoneStopFlashForAll(ZoneID[i]);
  3068. ZoneInfo[i][zTeam] = ZoneAttacker[i];
  3069. GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
  3070. ZoneAttacker[i] = -1;
  3071. for(new m=0; m<MAX_PLAYERS; m++)
  3072. RemovePlayerMapIcon(mP[m], 12);
  3073. SendClientMessage(playerid, COLOR_CYAN,"Your Team has taken a Turf, you recived +5 score");
  3074. SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
  3075. }
  3076. }
  3077. else // attackers failed to take over the zone
  3078. for(new m=0; m<MAX_PLAYERS; m++)
  3079. {
  3080. new
  3081. tStrb [50];
  3082.  
  3083. format(tStrb, sizeof(tStrb), "~g~%s ~w~gang has ~p~saved ~p~its Zone ~w~from ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
  3084. GameTextForPlayer(playerid, tStrb, 3000, 6);
  3085. RemovePlayerMapIcon(mP[m], 12);
  3086. GangZoneStopFlashForAll(ZoneID[i]);
  3087. ZoneAttacker[i] = -1;
  3088. SendClientMessage(i, COLOR_CYAN,"Your Team has Protected its turf and recived +2 Score");
  3089. SetPlayerScore(i, GetPlayerScore(i) + 2);
  3090. }
  3091. }
  3092. else // check if somebody is attacking
  3093. {
  3094. for(new t=0; t < sizeof(Teams); t++) // loop all teams
  3095. for(new m=0; m<MAX_PLAYERS; m++)
  3096. {
  3097. if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
  3098. {
  3099. new
  3100. tStr [50];
  3101.  
  3102. format(tStr, sizeof(tStr), "~g~%s ~w~gang has been ~p~Provoked ~w~for a war by ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
  3103. GameTextForPlayer(playerid, tStr, 3000, 6);
  3104. ZoneAttacker[i] = Teams[t];
  3105. ZoneAttackTime[i] = 0;
  3106. GangZoneFlashForAll(ZoneID[i], 0xFF000055);
  3107.  
  3108. new Float:x,Float:y,Float:z;
  3109.  
  3110. GetPlayerPos(playerid,x,y,z);
  3111.  
  3112. if(GetPlayerTeam(playerid) == TEAM_GROVE)
  3113. {
  3114. SetPlayerMapIcon(mP[m], 12, x,y,z, 62, 0, MAPICON_GLOBAL);
  3115. }
  3116. else if(GetPlayerTeam(playerid) == TEAM_BALLAS)
  3117. {
  3118. SetPlayerMapIcon(mP[m], 12, x,y,z, 59, 0, MAPICON_GLOBAL);
  3119. }
  3120. else if(GetPlayerTeam(playerid) == TEAM_VAGOS)
  3121. {
  3122. SetPlayerMapIcon(mP[m], 12, x,y,z, 60, 0, MAPICON_GLOBAL);
  3123. }
  3124. else if(GetPlayerTeam(playerid) == TEAM_AZTECS)
  3125. {
  3126. SetPlayerMapIcon(mP[m], 12, x,y,z, 58, 0, MAPICON_GLOBAL);
  3127. }
  3128. else if(GetPlayerTeam(playerid) == TEAM_SWAT)
  3129. {
  3130. SetPlayerMapIcon(mP[m], 12, x,y,z, 30, 0, MAPICON_GLOBAL);
  3131. }
  3132. }
  3133. }
  3134. }
  3135. }
  3136. }
  3137.  
  3138.  
  3139. public ZoneTimerA()
  3140. {
  3141. for(new m=0; m<MAX_PLAYERS; m++)
  3142. for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
  3143. {
  3144. if(ZoneAttacker[i] != -1) // zone is being attacked
  3145. {
  3146. if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
  3147. {
  3148. ZoneAttackTime[i]++;
  3149. if(ZoneAttackTime[i] == TAKEOVER_TIMEA) // zone has been under attack for enough time and attackers take over the zone
  3150. {
  3151. GangZoneStopFlashForAll(ZoneID[i]);
  3152. ZoneInfo[i][zTeam] = ZoneAttacker[i];
  3153. GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
  3154. ZoneAttacker[i] = -1;
  3155. RemovePlayerMapIcon(mP[m], 12);
  3156. }
  3157. }
  3158. else // attackers failed to take over the zone
  3159. {
  3160. RemovePlayerMapIcon(mP[m], 12);
  3161. GangZoneStopFlashForAll(ZoneID[i]);
  3162. ZoneAttacker[i] = -1;
  3163. }
  3164. }
  3165. }
  3166. }
  3167.  
  3168. forward RankUpdater(playerid);
  3169. public RankUpdater(playerid)
  3170. {
  3171. if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
  3172. {
  3173. TextDrawHideForPlayer(playerid,Rank1);
  3174. TextDrawHideForPlayer(playerid,Rank2);
  3175. TextDrawHideForPlayer(playerid,Rank3);
  3176. TextDrawHideForPlayer(playerid,Rank4);
  3177. TextDrawHideForPlayer(playerid,Rank5);
  3178. TextDrawHideForPlayer(playerid,Rank6);
  3179. TextDrawShowForPlayer(playerid,Rank);
  3180. }
  3181. if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
  3182. {
  3183. TextDrawHideForPlayer(playerid,Rank);
  3184. TextDrawHideForPlayer(playerid,Rank2);
  3185. TextDrawHideForPlayer(playerid,Rank3);
  3186. TextDrawHideForPlayer(playerid,Rank4);
  3187. TextDrawHideForPlayer(playerid,Rank5);
  3188. TextDrawHideForPlayer(playerid,Rank6);
  3189. TextDrawShowForPlayer(playerid,Rank1);
  3190. }
  3191. if (GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) <= 250)
  3192. {
  3193. TextDrawHideForPlayer(playerid,Rank1);
  3194. TextDrawHideForPlayer(playerid,Rank);
  3195. TextDrawHideForPlayer(playerid,Rank3);
  3196. TextDrawHideForPlayer(playerid,Rank4);
  3197. TextDrawHideForPlayer(playerid,Rank5);
  3198. TextDrawHideForPlayer(playerid,Rank6);
  3199. TextDrawShowForPlayer(playerid,Rank2);
  3200. }
  3201. if (GetPlayerScore(playerid) >= 250 && GetPlayerScore(playerid) <= 300)
  3202. {
  3203. TextDrawHideForPlayer(playerid,Rank1);
  3204. TextDrawHideForPlayer(playerid,Rank2);
  3205. TextDrawHideForPlayer(playerid,Rank);
  3206. TextDrawHideForPlayer(playerid,Rank4);
  3207. TextDrawHideForPlayer(playerid,Rank5);
  3208. TextDrawHideForPlayer(playerid,Rank6);
  3209. TextDrawShowForPlayer(playerid,Rank3);
  3210. }
  3211. if (GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) <= 350)
  3212. {
  3213. TextDrawHideForPlayer(playerid,Rank1);
  3214. TextDrawHideForPlayer(playerid,Rank2);
  3215. TextDrawHideForPlayer(playerid,Rank3);
  3216. TextDrawHideForPlayer(playerid,Rank);
  3217. TextDrawHideForPlayer(playerid,Rank5);
  3218. TextDrawHideForPlayer(playerid,Rank6);
  3219. TextDrawShowForPlayer(playerid,Rank4);
  3220. }
  3221. if (GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
  3222. {
  3223. TextDrawHideForPlayer(playerid,Rank1);
  3224. TextDrawHideForPlayer(playerid,Rank2);
  3225. TextDrawHideForPlayer(playerid,Rank3);
  3226. TextDrawHideForPlayer(playerid,Rank4);
  3227. TextDrawHideForPlayer(playerid,Rank5);
  3228. TextDrawHideForPlayer(playerid,Rank);
  3229. TextDrawShowForPlayer(playerid,Rank5);
  3230. }
  3231. if (GetPlayerScore(playerid) >= 400)
  3232. {
  3233. TextDrawHideForPlayer(playerid,Rank1);
  3234. TextDrawHideForPlayer(playerid,Rank2);
  3235. TextDrawHideForPlayer(playerid,Rank3);
  3236. TextDrawHideForPlayer(playerid,Rank4);
  3237. TextDrawHideForPlayer(playerid,Rank5);
  3238. TextDrawHideForPlayer(playerid,Rank);
  3239. TextDrawShowForPlayer(playerid,Rank6);
  3240. }
  3241. return 1;
  3242. }
Advertisement
Add Comment
Please, Sign In to add comment