Guest User

Untitled

a guest
Aug 14th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 198.01 KB | None | 0 0
  1. /*
  2. Created by Kitten
  3. Date created 9/28/12
  4. Time created 5:50 PM Mountain Time Zone
  5. */
  6.  
  7. // Evac 0 = Can't fit the evac type || Evac 1 = Vehicle or Land Area || Evac 2 = Helicopter Vehicle on Land nor Air Area
  8.  
  9. #include <a_samp>
  10. #include <a_mysql>
  11. #include <zcmd>
  12. #include <sscanf2>
  13. #include <foreach>
  14. #include <YSI\y_ini>
  15.  
  16. // Defines
  17. #define function%0(%1) forward%0(%1);public%0(%1)
  18. #define NON_IMMUNE 144,119,5,281,276,230,274,161,27,25,275,8,29,260,149,123,44,188,261,16,279,294,287
  19. #define MAX_MAPTIME 250
  20. #define MAX_RESTART_TIME 10000
  21. #define MAX_MAPUPDATE_TIME 5000
  22. #define MAX_SHOW_CP_TIME 1000
  23. #define MAX_END_TIME 60000
  24. #define MAX_BALANCERUPDATE_TIME 6000
  25. #define MAX_MAP_FILES 17
  26.  
  27. #define SQL_HOST ""
  28. #define SQL_USER ""
  29. #define SQL_PASS ""
  30. #define SQL_DB ""
  31.  
  32. #define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
  33.  
  34. #define NAME "...|| ZOMBIE APOCALYPSE ||..."
  35. #define SCRIPT "b2.3"
  36. #define SCRIPTER "Kitten"
  37. #define SITE "your site"
  38. #define chat "{FFFFFF}»"
  39. #define PLAYER_MUTE_TIME_MINUTES (2)
  40.  
  41. #define DIALOG_REGISTER 0
  42. #define DIALOG_LOGIN 1
  43. #define DIALOG_RADIO 2
  44. #define DIALOG_KICK 3
  45. #define DIALOG_TOP 4
  46. #define DIALOG_WARN 5
  47. #define DIALOG_BANNED 6
  48. #define DIALOG_CMDS 7
  49. #define DIALOG_HELP 8
  50. #define DIALOG_HOWTOXP 9
  51. #define DIALOG_ACMDS 10
  52. #define DIALOG_RULES 11
  53. #define DIALOG_CLASS 12
  54. #define DIALOG_CLASS_2 13
  55. #define DIALOG_CLASS_3 14
  56. #define DIALOG_ADMINS 15
  57. #define DIALOG_VIPS 16
  58. #define DIALOG_REPORT 17
  59. #define DIALOG_REPORT_2 18
  60. #define DIALOG_SHOUT 19
  61. #define DIALOG_VIPINFO 20
  62. #define DIALOG_VIP 21
  63. #define DIALOG_VIP_CLASS 22
  64. #define DIALOG_COINS 23
  65.  
  66. #define TEAM_ZOMBIE 0
  67. #define TEAM_HUMAN 1
  68.  
  69. #define COLOR_PINK 0xFFC0CB77
  70. #define COLOR_HUMAN 0x33CCFF44
  71. #define COLOR_ZOMBIE 0x9ACD3244
  72. #define COLOR_RED 0xAA3333AA
  73. #define COLOR_YELLOW 0xFFFF00AA
  74.  
  75. // Human Classes
  76. #define CIVILIAN 1501 // Silenced Pistol, Shotgun - 0 XP
  77. #define POLICEMAN 1502 // Deagle,Shotgun - 500 XP
  78. #define MEDIC 1503 // Shotgun,Silenced Pistol,Armour,Cure Infected - 1000 XP
  79. #define SCOUT 1504 // Sniper,Silenced Pistol - 1500 XP
  80. #define HEAVYMEDIC 1505 // Deagle,Shotgun,Armour,Cure Infected - 5000 XP
  81. #define FARMER 1506 // Deagle,AK,County Rifle,Armour - 6000 XP
  82. #define ENGINEER 1507 // Silenced Pistol,Shotgun,Armour,Build Boxes - 7500 XP
  83. #define SWAT 1508 // MP5,Deagle,Armour,Immunity - 10,000 XP
  84. #define HEAVYSHOTGUN 1509 // Shotgun, Deagle,Armour,More shotgun damage - 20,000 XP
  85. #define ADVANCEDMEDIC 1510 // M4,Deagle,Shotgun,Cure all - 25,000 XP
  86. #define ADVANCEDENGINEER 1511 // Deagle,M4,Armour,Build Boxes - 30,000 XP
  87. #define FEDERALAGENT 1512 // M4,Deagle,Shotgun,Armour,Immunity - 35,000 XP
  88. #define KICKBACK 1513 // Silenced Pistol,Shotgun,MP5 - 45000 XP
  89. #define ADVANCEDSCOUT 1514 // Sniper,Deagle,High jump,Half Armour - 100,000 XP
  90. #define ASSASSIN 1515 // M4,Shotgun - Plant C4's - 120,000 XP - REMOVED
  91. #define VIPENGINEER 1516
  92. #define VIPMEDIC 1517
  93. #define VIPSCOUT 1518
  94. #define E_ENGINEER 1519 // Deagle,Shotgun,Armour - Build Ladders - 35,000 XP
  95. #define SOLIDER 1520 // Solider - AK47,Deagle - 6500 XP
  96. #define DOCTOR 1521 // Silenced Pistol - Heal,Cure,Shield Heal - Rank 22
  97.  
  98. // Zombie Classes
  99. #define STANDARDZOMBIE 2501 // LALT Infect a Player - 0 XP
  100. #define MUTATEDZOMBIE 2502 // LALT Infect Drunk Vision - 500 XP
  101. #define FASTZOMBIE 2503 // High Jump - 5000 XP
  102. #define REAPERZOMBIE 2504 // More damage with chainsaw - 10,000 XP
  103. #define WITCHZOMBIE 2505 // LALT 75 Damage - 18,000 XP
  104. #define BOOMERZOMBIE 2506 // Explodes on death and infect - 20,000 XP
  105. #define STOMPERZOMBIE 2507 // LALT Throw all around you - 25,000 XP
  106. #define SCREAMERZOMBIE 2508 // LALT Throw everyone around you on the floor - 35,000 XP
  107. #define ADVANCEDMUTATED 2509 // LALT Infect all around - 65,000 XP
  108. #define ADVANCEDSCREAMER 2510 // LALT Throw all +5hp - 70,000 XP
  109. #define FLESHEATER 2511 // LALT Infect a player kills faster - 100,000 XP
  110. #define ADVANCEDWITCH 2512 // LALT 99 Damage - 150,000 XP
  111. #define ADVANCEDBOOMER 2513 // LALT Explode - 200,000 XP
  112.  
  113. #define COL_WHITE "{FFFFFF}"
  114. #define COL_GREY "{C3C3C3}"
  115. #define COL_GREEN "{37DB45}"
  116. #define COL_RED "{F81414}"
  117. #define COL_YELLOW "{F3FF02}"
  118. #define COL_ORANGE "{F9B857}"
  119. #define COL_BLUE "{0049FF}"
  120. #define COL_PINK "{FF00EA}"
  121. #define COL_LIGHTBLUE "{00C0FF}"
  122. #define COL_LGREEN "{C9FFAB}"
  123.  
  124. // Variables
  125. new time;
  126. new mapvar;
  127. new balvar;
  128. new mapid;
  129. new gateobj;
  130. new playerOnline;
  131. new playersAliveCount;
  132. new DocShield;
  133. new meatDrops[MAX_PLAYERS];
  134. new LastMapStarted = -1;
  135.  
  136. new playedtimer[MAX_PLAYERS];
  137. new team[MAX_PLAYERS];
  138. new c4Obj[MAX_PLAYERS];
  139. new PlayerShotPlayer[MAX_PLAYERS][MAX_PLAYERS];
  140.  
  141. new Text:EventText;
  142. new Text:CurrentMap;
  143. new Text:remadeText;
  144. new Text:remadeText2;
  145. new Text:AliveInfo;
  146. new Text:TimeLeft;
  147. new Text:UntilRescue;
  148. new Text:XP;
  149. new Text:Infected[MAX_PLAYERS];
  150. new Text:iKilled[MAX_PLAYERS];
  151. new Text:myXP[MAX_PLAYERS];
  152. new Text:ServerIntroOne[MAX_PLAYERS];
  153. new Text:ServerIntroTwo[MAX_PLAYERS];
  154.  
  155. new pubstring[256];
  156. new shoutstring[256];
  157.  
  158. enum mapinfo
  159. {
  160. MapName[128],
  161. FSMapName[128],
  162. Float:HumanSpawnX,
  163. Float:HumanSpawnY,
  164. Float:HumanSpawnZ,
  165. Float:HumanSpawn2X,
  166. Float:HumanSpawn2Y,
  167. Float:HumanSpawn2Z,
  168. Float:ZombieSpawnX,
  169. Float:ZombieSpawnY,
  170. Float:ZombieSpawnZ,
  171. Float:GateX,
  172. Float:GateY,
  173. Float:GateZ,
  174. Float:GaterX,
  175. Float:GaterY,
  176. Float:GaterZ,
  177. Float:CPx,
  178. Float:CPy,
  179. Float:CPz,
  180. GateID,
  181. MoveGate,
  182. AllowWater,
  183. Interior,
  184. Weather,
  185. Time,
  186. EvacType,
  187. IsStarted,
  188. XPType,
  189. };
  190. new Map[mapinfo];
  191.  
  192. enum playerinfo
  193. {
  194. pUsername[24],
  195. pPassword[128],
  196. pXP,
  197. pKills,
  198. pDeaths,
  199. pRank,
  200. pEvac,
  201. pAdminLevel,
  202. pVipLevel,
  203. pHour,
  204. pMin,
  205. pSec,
  206. pMapsPlayed,
  207. pCoins,
  208. pLogged,
  209. pWarnings,
  210. pPM,
  211. IsPlayerMuted,
  212. Killstreak,
  213. pHumanClass,
  214. pZombieClass,
  215. IsPlayerInfected,
  216. IsPlayerInfectedTimer,
  217. Boxes,
  218. BoxesAdvanced,
  219. C4,
  220. pVipKickBack,
  221. pVipFlash,
  222. pVipBoxes,
  223. pLadders,
  224. pKickBackCoin,
  225. pDamageShotgunCoin,
  226. pDamageDeagleCoin,
  227. pDamageMP5Coin,
  228. pDoctorShield
  229. };
  230. new pInfo[MAX_PLAYERS][playerinfo];
  231.  
  232. enum aname
  233. {
  234. HighJumpScout,
  235. HighJumpZombie,
  236. StomperPushing,
  237. WitchAttack,
  238. ScreamerZombieAb,
  239. ScreamerZombieAb2,
  240. InfectionNormal,
  241. InfectionMutated,
  242. ShoutCooldown,
  243. HealCoolDown,
  244. AdvancedMutatedCooldown,
  245. WitchAttack2,
  246. InfectionFleshEater
  247. }
  248. new Abilitys[MAX_PLAYERS][aname];
  249.  
  250. new randomMessages[][] =
  251. {
  252. ""chat""COL_LGREEN" Want more XP or More Classes or even more features donate now"COL_WHITE" (/vip)",
  253. ""chat""COL_LGREEN" Visit our forums for discussion and server updates "SITE"",
  254. ""chat""COL_LGREEN" Earn XP by killing the enemy team or using your ability and donating for double XP!",
  255. ""chat""COL_LGREEN" Are you lost are you new? try out the command '/help'",
  256. ""chat""COL_LGREEN" Remember to report hackers and rule breakers at /report > Pick a reason > Give the player ID done!",
  257. ""chat""COL_LGREEN" Join our teamspeak 3 to talk to our staff team and many others! Your TS3 IP",
  258. ""chat""COL_LGREEN" Remember to read the rules to prevent you from getting banned /rules"
  259. };
  260.  
  261. forward load_Map_basic(Mapid, name[], value[]);
  262. forward TimeOnServer(playerid);
  263. forward Float:GetDistanceBetweenPlayers(p1,p2);
  264. forward GetClosestPlayer(p1);
  265. forward RandomZombie();
  266.  
  267. main()
  268. {
  269. print("\n----------------------------------");
  270. print(""NAME" Loaded with version of "SCRIPT"");
  271. print("----------------------------------\n");
  272. }
  273.  
  274. function StartMap()
  275. {
  276. foreach(Player,i)
  277. {
  278. SetCameraBehindPlayer(i);
  279. ClearAnimations(i);
  280. HumanSetup(i);
  281. SpawnPlayer(i);
  282. CurePlayer(i);
  283. SetPlayerDrunkLevel(i,0);
  284. DisablePlayerCheckpoint(i);
  285. pInfo[i][Boxes] = 3;
  286. pInfo[i][BoxesAdvanced] = 7;
  287. pInfo[i][pVipBoxes] = 9;
  288. pInfo[i][pLadders] = 4;
  289. pInfo[i][C4] = 2;
  290. pInfo[i][pDoctorShield] = 1;
  291. pInfo[i][pMapsPlayed]++;
  292. TextDrawHideForPlayer(i, ServerIntroOne[i]);
  293. TextDrawHideForPlayer(i, ServerIntroTwo[i]);
  294. DestroyPickup(meatDrops[i]);
  295. DestroyObject(DocShield);
  296. TogglePlayerControllable(i,1);
  297. }
  298.  
  299. time = MAX_MAPTIME;
  300.  
  301. SetWeather(Map[Weather]);
  302. SetWorldTime(Map[Time]);
  303. UpdateMapName();
  304.  
  305. SetTimer("RandomZombie",1000,false);
  306. gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
  307. mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
  308. balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
  309. return 1;
  310. }
  311.  
  312. function EndMap()
  313. {
  314. ClearObjects();
  315. DestroyAllVehicle();
  316. UnloadFilterScript(Map[FSMapName]);
  317. LoadMap(LoadNewMap());
  318. LoadFilterScript(Map[FSMapName]);
  319.  
  320. SetTimer("StartMap",MAX_RESTART_TIME,false);
  321. GameTextForAll("~n~~n~~n~~n~~n~~g~Loading~w~ next map",3500,5);
  322.  
  323. foreach(Player,i)
  324. {
  325. ChangeCameraView(i);
  326. TogglePlayerControllable(i,0);
  327. TextDrawShowForPlayer(i, ServerIntroOne[i]);
  328. TextDrawShowForPlayer(i, ServerIntroTwo[i]);
  329. }
  330.  
  331. SendClientMessageToAll(-1,""chat""COL_YELLOW" Creating Objects...");
  332. return 1;
  333. }
  334.  
  335. function OnMapUpdate()
  336. {
  337. time -= 5;
  338.  
  339. new str[64];
  340. format(str,sizeof(str),"%d",time);
  341. TextDrawSetString(TimeLeft,str);
  342.  
  343. if(time <= 0) TextDrawSetString(TimeLeft," ..."),KillTimer(mapvar),KillTimer(balvar),SetTimer("ShowCheckpoint",MAX_SHOW_CP_TIME,false);
  344. return 1;
  345. }
  346.  
  347. function ShowCheckpoint()
  348. {
  349. CreateEvacMaps();
  350. MoveObject(gateobj,Map[GateX],Map[GateY],Map[MoveGate],3.0);
  351. foreach(Player,i) SetPlayerCheckpoint(i,Map[CPx],Map[CPy],Map[CPz],6.0);
  352. SetTimer("EndMap",MAX_END_TIME,false);
  353. return 1;
  354. }
  355.  
  356. function OnMapBalance()
  357. {
  358. if(playerOnline >= 2)
  359. {
  360. if(GetTeamPlayersAlive(TEAM_HUMAN) == 0)
  361. {
  362. KillTimer(balvar);
  363. KillTimer(mapvar);
  364. TextDrawSetString(TimeLeft,"~r~Zombies win");
  365. SetTimer("EndMap",4000,false); // Cannot use MAX_END_TIME Because of MAX_END_TIME is set to 1 minute not 4 seconds *NOTE TO ME*
  366. foreach(Player,i)
  367. {
  368. if(team[i] == TEAM_ZOMBIE)
  369. {
  370. pInfo[i][pXP] += 30;
  371. GivePlayerXP(i,30);
  372. }
  373. }
  374. }
  375. }
  376. return 1;
  377. }
  378.  
  379. public OnPlayerEnterCheckpoint(playerid)
  380. {
  381. if(team[playerid] == TEAM_HUMAN)
  382. {
  383. new string[256];
  384. if(Map[EvacType] == 1)
  385. {
  386. SetPlayerInterior(playerid,0);
  387. SetPlayerPos(playerid,-1408.2051,-970.8841,198.9738);
  388. format(string,sizeof(string), ""chat""COL_LGREEN" %s made it to evacuation point and has received 1 coin!",PlayerName(playerid));
  389. SendClientMessageToAll(-1,string);
  390. DisablePlayerCheckpoint(playerid);
  391. CurePlayer(playerid);
  392. GivePlayerXP(playerid,50);
  393. pInfo[playerid][pEvac]++;
  394. pInfo[playerid][pCoins]++;
  395. SetPlayerColor(playerid,COLOR_YELLOW);
  396. }
  397.  
  398. if(Map[EvacType] == 2)
  399. {
  400. SetPlayerPos(playerid,3024.4983,447.9744,14.7813);
  401. SetPlayerInterior(playerid,0);
  402. format(string,sizeof(string), ""chat""COL_LGREEN" %s made it to the water evacuation point and has received 1 coin!",PlayerName(playerid));
  403. SendClientMessageToAll(-1,string);
  404. DisablePlayerCheckpoint(playerid);
  405. CurePlayer(playerid);
  406. GivePlayerXP(playerid,50);
  407. pInfo[playerid][pEvac]++;
  408. pInfo[playerid][pCoins]++;
  409. SetPlayerColor(playerid,COLOR_YELLOW);
  410. }
  411.  
  412. if(Map[EvacType] == 3)
  413. {
  414. SetPlayerPos(playerid,285.5,2510.30004882817,121.5);
  415. SetPlayerInterior(playerid,0);
  416. format(string,sizeof(string), ""chat""COL_LGREEN" %s made it to the helicopter evacuation point and has received 1 coin!",PlayerName(playerid));
  417. SendClientMessageToAll(-1,string);
  418. DisablePlayerCheckpoint(playerid);
  419. CurePlayer(playerid);
  420. GivePlayerXP(playerid,50);
  421. pInfo[playerid][pEvac]++;
  422. pInfo[playerid][pCoins]++;
  423. SetPlayerColor(playerid,COLOR_YELLOW);
  424. }
  425. }
  426. return 1;
  427. }
  428.  
  429. public OnPlayerPickUpPickup(playerid, pickupid)
  430. {
  431. new string[256];
  432. DestroyPickup(meatDrops[playerid]);
  433. if(team[playerid] == TEAM_ZOMBIE)
  434. {
  435. if(pInfo[playerid][pZombieClass] == BOOMERZOMBIE) { SetPlayerHealth(playerid,50); }
  436. else { SetPlayerHealth(playerid,100.0); }
  437. }
  438.  
  439. if(team[playerid] == TEAM_HUMAN)
  440. {
  441. if(pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == ADVANCEDENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == E_ENGINEER)
  442. {
  443. switch(pInfo[playerid][pHumanClass])
  444. {
  445. case ENGINEER: pInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops[playerid]);
  446. case ADVANCEDENGINEER: pInfo[playerid][BoxesAdvanced] += 2,GameTextForPlayer(playerid,"~g~Found~w~: 2 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
  447. case VIPENGINEER: pInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
  448. case E_ENGINEER: pInfo[playerid][pLadders] += 1,GameTextForPlayer(playerid,"~g~Found~w~: 1 Ladders",4000,5),DestroyPickup(meatDrops[playerid]);
  449. }
  450. }
  451. else
  452. {
  453. if(pInfo[playerid][IsPlayerInfected] == 0)
  454. {
  455. new slot, weap, ammo;
  456. for ( slot = 0; slot < 14; slot++ )
  457. {
  458. GetPlayerWeaponData(playerid,slot,weap,ammo);
  459. if(IsValidWeapon(weap))
  460. {
  461. new randomselect = random(2);
  462. switch(randomselect)
  463. {
  464. case 0:
  465. {
  466. new randomammo = random(50);
  467. GivePlayerWeapon(playerid,weap,randomammo);
  468. format(string,sizeof(string),"~g~Found~w~: %d ammo",randomammo);
  469. GameTextForPlayer(playerid,string,4000,5);
  470. DestroyPickup(meatDrops[playerid]);
  471. }
  472. case 1:
  473. {
  474. new randomxp = random(35);
  475. format(string,sizeof(string),"~g~Found~w~: %d XP",randomxp);
  476. GameTextForPlayer(playerid,string,4000,5);
  477. pInfo[playerid][pXP] += randomxp;
  478. DestroyPickup(meatDrops[playerid]);
  479. }
  480. }
  481. }
  482. }
  483. }
  484. }
  485. }
  486. return 1;
  487. }
  488.  
  489. public OnGameModeInit()
  490. {
  491. SetGameModeText("Zombie Arcade "SCRIPT"");
  492. SendRconCommand("hostname "NAME"");
  493. SendRconCommand("weburl "SITE"");
  494.  
  495. AddPlayerClass(181, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  496. AllowInteriorWeapons(1);
  497. DisableInteriorEnterExits();
  498. SetTimer("RandomMessages",59000,true);
  499. SetTimer("OnServerUpdate", 1000, true);
  500.  
  501. SetTeamCount(2);
  502.  
  503. Map[IsStarted] = 0;
  504. Map[XPType] = 1;
  505. mapid = 0;
  506. SetWorldTime(0);
  507. SetWeather(12);
  508. DefaultTextdraws();
  509.  
  510. mysql_connect(SQL_HOST,SQL_USER,SQL_DB,SQL_PASS);
  511. mysql_debug(1);
  512. return 1;
  513. }
  514.  
  515. function OnServerUpdate()
  516. {
  517. foreach(Player, i)
  518. {
  519. if(GetPlayerMoney(i) >= 1) return ResetPlayerMoney(i);
  520. SetPlayerScore(i,pInfo[i][pXP]);
  521. UpdateXPTextdraw(i);
  522.  
  523. if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
  524. {
  525. new Admin[24] = "Anti-cheat";
  526. new reason3[128] = "Jetpack";
  527. BanPlayer(i,reason3,Admin);
  528. }
  529.  
  530. new Float:armor;
  531. GetPlayerArmour(i,armor);
  532. if(armor >= 96)
  533. {
  534. new Admin[24] = "Anti-cheat";
  535. new reason3[128] = "Armour Hack (Exceeded over 96f)";
  536. BanPlayer(i,reason3,Admin);
  537. }
  538.  
  539. if(team[i] == TEAM_ZOMBIE)
  540. {
  541. switch(GetPlayerWeapon(i))
  542. {
  543. case 2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46:
  544. {
  545. ResetPlayerWeapons(i);
  546. GivePlayerWeapon(i,9,1);
  547. }
  548. }
  549. }
  550.  
  551. if(team[i] == TEAM_ZOMBIE)
  552. {
  553. if(armor > 0.0)
  554. {
  555. SetPlayerArmour(i,0.0);
  556. }
  557. }
  558.  
  559. if(IsPlayerInAnyVehicle(i))
  560. {
  561. if(pInfo[i][pAdminLevel] == 0)
  562. {
  563. Kick(i);
  564. }
  565. }
  566.  
  567. if(pInfo[i][pVipFlash] == 1)
  568. {
  569. switch(random(2))
  570. {
  571. case 0: SetPlayerColor(i,COLOR_YELLOW);
  572. case 1: SetPlayerColor(i,COLOR_RED);
  573. }
  574. }
  575.  
  576. DoctorShield();
  577. UpdateAliveInfo();
  578. }
  579. return 1;
  580. }
  581.  
  582. public OnGameModeExit()
  583. {
  584. TextDrawHideForAll(TimeLeft);
  585. TextDrawDestroy(TimeLeft);
  586. TextDrawHideForAll(UntilRescue);
  587. TextDrawHideForAll(AliveInfo);
  588. TextDrawDestroy(AliveInfo);
  589. TextDrawHideForAll(remadeText);
  590. TextDrawDestroy(remadeText);
  591. TextDrawHideForAll(remadeText2);
  592. TextDrawDestroy(remadeText2);
  593. TextDrawHideForAll(CurrentMap);
  594. TextDrawDestroy(CurrentMap);
  595. TextDrawHideForAll(XP);
  596. TextDrawDestroy(XP);
  597. TextDrawHideForAll(EventText);
  598. TextDrawDestroy(EventText);
  599.  
  600. for(new i; i < MAX_PLAYERS; i ++)
  601. {
  602. TextDrawHideForAll(Infected[i]);
  603. TextDrawHideForAll(iKilled[i]);
  604. TextDrawDestroy(iKilled[i]);
  605. TextDrawHideForAll(myXP[i]);
  606. TextDrawDestroy(myXP[i]);
  607. TextDrawHideForAll(ServerIntroOne[i]);
  608. TextDrawDestroy(ServerIntroOne[i]);
  609. TextDrawHideForAll(ServerIntroTwo[i]);
  610. TextDrawDestroy(ServerIntroTwo[i]);
  611. }
  612. return 1;
  613. }
  614.  
  615. public OnPlayerRequestClass(playerid, classid)
  616. {
  617. SetPlayerPos(playerid, 2416.0110,-51.3177,28.1535);
  618. SetPlayerFacingAngle(playerid,22.4579);
  619. SetPlayerCameraPos(playerid, 2412.3711,-39.9486,28.8258);
  620. SetPlayerCameraLookAt(playerid, 2416.0110,-51.3177,28.1535);
  621.  
  622. if(classid == 0)
  623. {
  624. SetPlayerTeam(playerid,TEAM_ZOMBIE);
  625. team[playerid] = TEAM_ZOMBIE;
  626. }
  627. return 1;
  628. }
  629.  
  630. public OnPlayerRequestSpawn(playerid)
  631. {
  632. if(pInfo[playerid][pLogged] == 0)
  633. {
  634. GameTextForPlayer(playerid,"~r~YOU MUST LOGIN TO PLAY",1000,4);
  635. new Query[300],string[128],pname[24],escpname[24];
  636. GetPlayerName(playerid,pname,24);
  637. mysql_real_escape_string(pname, escpname);
  638. format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `Username` = '%s'", escpname);
  639. mysql_query(Query);
  640. mysql_store_result();
  641. if(mysql_num_rows() != 0)
  642. {
  643. if(pInfo[playerid][pLogged] == 0)
  644. {
  645. format(string,sizeof(string),""chat" Welcome back %s to "NAME"",PlayerName(playerid));
  646. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
  647. return 0;
  648. }
  649. }
  650. else
  651. {
  652. if(pInfo[playerid][pLogged] == 0)
  653. {
  654. format(string,sizeof(string),""chat" Hello %s",PlayerName(playerid));
  655. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
  656. return 0;
  657. }
  658. }
  659. mysql_free_result();
  660. }
  661. return 1;
  662. }
  663.  
  664. public OnPlayerConnect(playerid)
  665. {
  666. playerOnline++;
  667. ResetVars(playerid);
  668. ConnectVars(playerid);
  669. new Query[300],string[128],pname[24],escpname[24];
  670. GetPlayerName(playerid,pname,24);
  671. mysql_real_escape_string(pname, escpname);
  672. format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `Username` = '%s'", escpname);
  673. mysql_query(Query);
  674. mysql_store_result();
  675. if(mysql_num_rows() != 0)
  676. {
  677. format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
  678. ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
  679. }
  680. else
  681. {
  682. format(string,sizeof(string),""chat" Hello %s to "NAME"",PlayerName(playerid));
  683. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
  684. }
  685. mysql_free_result();
  686. return 1;
  687. }
  688.  
  689. public OnPlayerDisconnect(playerid, reason)
  690. {
  691. if(pInfo[playerid][pLogged] == 1) { SaveStats(playerid); } else return 0;
  692. ResetVars(playerid);
  693. playersAliveCount--;
  694. playerOnline--;
  695. if(playerOnline == 0) return SendRconCommand("mapname Loading"),KillTimer(mapvar),KillTimer(balvar),Map[IsStarted] = 0;
  696. return 1;
  697. }
  698.  
  699. public OnPlayerSpawn(playerid)
  700. {
  701. playersAliveCount++;
  702. CheckToStartMap();
  703. SetPlayerInterior(playerid,Map[Interior]);
  704.  
  705. if(team[playerid] == TEAM_ZOMBIE)
  706. {
  707. ZombieSetup(playerid);
  708. SetPlayerPos(playerid,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]);
  709. }
  710.  
  711. if(team[playerid] == TEAM_HUMAN)
  712. {
  713. HumanSetup(playerid);
  714. switch(random(2))
  715. {
  716. case 0: SetPlayerPos(playerid,Map[HumanSpawnX],Map[HumanSpawnY],Map[HumanSpawnZ]);
  717. case 1: SetPlayerPos(playerid,Map[HumanSpawn2X],Map[HumanSpawn2Y],Map[HumanSpawn2Z]);
  718. }
  719. }
  720. sendClassMessage(playerid);
  721. setClass(playerid);
  722. SpawnVars(playerid);
  723. return 1;
  724. }
  725.  
  726. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  727. {
  728. switch(dialogid)
  729. {
  730. case DIALOG_REGISTER:
  731. {
  732. if(response)
  733. {
  734. if(!strlen(inputtext) || strlen(inputtext) > 128)
  735. {
  736. new string[128];
  737. SendClientMessage(playerid, -1, ""chat" You must insert a password between 1-128 characters!");
  738. format(string,sizeof(string),""chat" Hello %s to "NAME"",PlayerName(playerid));
  739. ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD ,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
  740. }
  741. else if(strlen(inputtext) > 0 && strlen(inputtext) < 128)
  742. {
  743. new escpass[100];
  744. mysql_real_escape_string(inputtext, escpass);
  745. MySQL_Register(playerid, escpass);
  746. }
  747. }
  748. if(!response)
  749. {
  750. ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You must register to play at "NAME"","Close","");
  751. Kick(playerid);
  752. }
  753. }
  754.  
  755. case DIALOG_LOGIN:
  756. {
  757. if(!response)
  758. {
  759. ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_MSGBOX,"Kicked",""chat" You must login to play at "NAME"","Close","");
  760. Kick(playerid);
  761. }
  762. if(response)
  763. {
  764. new query[200], pname[24], escapepass[100];
  765. GetPlayerName(playerid, pname, 24);
  766. mysql_real_escape_string(inputtext, escapepass);
  767. format(query, sizeof(query), "SELECT `Username` FROM users WHERE Username = '%s' AND password = SHA1('%s')", pname, escapepass);
  768. mysql_query(query);
  769. mysql_store_result();
  770.  
  771. new numrows = mysql_num_rows();
  772. if(numrows == 1) MySQL_Login(playerid);
  773.  
  774. if(!numrows)
  775. {
  776. new string[256];
  777. format(string,sizeof(string),""chat" Welcome back %s to "NAME"",PlayerName(playerid));
  778. ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
  779. }
  780. mysql_free_result();
  781. }
  782. }
  783.  
  784. case DIALOG_RADIO:
  785. {
  786. if(response)
  787. {
  788. switch(listitem)
  789. {
  790. case 0: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/DancePop.pls");
  791. case 1: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/JPop.pls");
  792. case 2: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/Kpop.pls");
  793. case 3: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/heavyrock.pls");
  794. case 4: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/hiphop.pls");
  795. case 5: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/hiphop2.pls");
  796. case 6: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/hiphop3.pls");
  797. case 7: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/pop.pls");
  798. case 8: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/rock.pls");
  799. case 9: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/rock2.pls");
  800. case 10: PlayAudioStreamForPlayer(playerid,"http://zombie-mod.com/radio/techno.pls");
  801. case 11: StopAudioStreamForPlayer(playerid);
  802. }
  803. }
  804. }
  805.  
  806. case DIALOG_CLASS:
  807. {
  808. if(response)
  809. {
  810. switch(listitem)
  811. {
  812. case 0:
  813. {
  814. if(team[playerid] == TEAM_HUMAN)
  815. {
  816. new string[1800];
  817. strcat(string,"Civilian - Silenced Pistol,Shotgun - 0 XP\nPolice Man - Deagle,Shotgun - 500 XP\nMedic -Shotgun,Silenced Pistol,Armour,Cure Infected - 1000 XP\n\
  818. Scout - Sniper,Silenced Pistol - 1500 XP\nHeavy Medic - Deagle,Shotgun,Armour,Cure Infected - 5000 XP\nFarmer - Deagle,AK,County Rifle,Armour - 6000 XP\n");
  819. strcat(string,"Soldier - AK47,Deagle - 6500 XP\nEngineer - Silenced Pistol,Shotgun,Armour,Build Boxes - 7500 XP\nS.W.A.T - MP5,Deagle,Armour,Immunity - 15,000 XP\n\
  820. Heavy Shotgun - Shotgun,Deagle,Armour,More shotgun damage - 20,000 XP\nAdvanced Medic - M4,Deagle,Shotgun,Cure all - 25,000 XP\n");
  821. strcat(string,"Advanced Engineer - Deagle,M4,Armour,Build Boxes - 30,000 XP\nExperienced Engineer -Deagle,Shotgun,Armour - Build Ladders - 35,000 XP\n\
  822. Kick Back - Silenced Pistol,Shotgun,MP5 - 45000 XP\nFederal Agent - M4,Deagle,Shotgun,Armour,Immunity - 50,000 XP\n\
  823. Advanced Scout - Sniper,Deagle,High jump,Half Armour - 100,000 XP\nDoctor - Silenced Pistol - Heal,Cure,Shield Heal,Half Immunity - Rank 22");
  824.  
  825. ShowPlayerDialog(playerid,DIALOG_CLASS_2,DIALOG_STYLE_LIST,"Class Selection (Human)",string,"Select","Close");
  826. }
  827. else return SendClientMessage(playerid,-1,""chat" You must be a human to use human classes!");
  828. }
  829.  
  830. case 1:
  831. {
  832. if(team[playerid] == TEAM_ZOMBIE)
  833. {
  834. new string[1000];
  835. strcat(string,"Standard Zombie - LALT Infect a player - 0 XP\nMutated Zombie - LALT Infect Drunk Vision - 500 XP\nFast Zombie - High Jump - 5,000 XP\n\
  836. Reaper Zombie - More damage with chainsaw - 10,000 XP\nWitch Zombie - LALT 75 Damage - 18,000 XP\n");
  837. strcat(string,"Boomer Zombie - Explodes on death and infect - 20,000 XP\n\
  838. Stomper Zombie - LALT Throw all around you - 25,000 XP\nScreamer - LALT Drop everyone down - 35000 XP & LVL 15\nAdvanced Mutated - LALT Infect all around - 65,000 XP\n\
  839. Advanced Screamer - LALT Throw all +5hp - 70,000 XP\n");
  840. strcat(string,"Flesh Eater - LALT Infect a player kills faster - 100,000 XP\nAdvanced Witch - LALT 99 Damage - 150,000 XP\nAdvanced Boomer - LALT Explode - 500,000 X");
  841.  
  842. ShowPlayerDialog(playerid,DIALOG_CLASS_3,DIALOG_STYLE_LIST,"Class Selection (Zombie)",string,"Select","Close");
  843. }
  844. else return SendClientMessage(playerid,-1,""chat" You must be a zombie to use zombie classes!");
  845. }
  846.  
  847. case 2: SendClientMessage(playerid,-1,""chat""COL_LGREEN" On October 31st 2012 we are having an 24hour event these classes will be enabled around October 30th!");
  848. }
  849. }
  850. }
  851.  
  852. case DIALOG_CLASS_2:
  853. {
  854. if(response)
  855. {
  856. switch(listitem)
  857. {
  858. case 0: if(pInfo[playerid][pXP] >= 0) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = CIVILIAN,setClass(playerid); else { SendXPError(playerid,0); }
  859. case 1: if(pInfo[playerid][pXP] >= 500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = POLICEMAN,setClass(playerid); else { SendXPError(playerid,500); }
  860. case 2: if(pInfo[playerid][pXP] >= 1000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = MEDIC,setClass(playerid); else { SendXPError(playerid,1000); }
  861. case 3: if(pInfo[playerid][pXP] >= 1500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = SCOUT,setClass(playerid); else { SendXPError(playerid,1500); }
  862. case 4: if(pInfo[playerid][pXP] >= 5000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = HEAVYMEDIC,setClass(playerid); else { SendXPError(playerid,5000); }
  863. case 5: if(pInfo[playerid][pXP] >= 6000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = FARMER,setClass(playerid); else { SendXPError(playerid,6000); }
  864. case 6: if(pInfo[playerid][pXP] >= 6500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = SOLIDER,setClass(playerid); else { SendXPError(playerid,6500); }
  865. case 7: if(pInfo[playerid][pXP] >= 7500) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ENGINEER,setClass(playerid); else { SendXPError(playerid,7500); }
  866. case 8: if(pInfo[playerid][pXP] >= 15000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = SWAT,setClass(playerid); else { SendXPError(playerid,10000); }
  867. case 9: if(pInfo[playerid][pXP] >= 20000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = HEAVYSHOTGUN,setClass(playerid); else { SendXPError(playerid,20000); }
  868. case 10: if(pInfo[playerid][pXP] >= 25000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDMEDIC,setClass(playerid); else { SendXPError(playerid,25000); }
  869. case 11: if(pInfo[playerid][pXP] >= 30000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDENGINEER,setClass(playerid); else { SendXPError(playerid,30000); }
  870. case 12: if(pInfo[playerid][pXP] >= 35000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = E_ENGINEER,setClass(playerid); else { SendXPError(playerid,35000); }
  871. case 13: if(pInfo[playerid][pXP] >= 45000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = KICKBACK,setClass(playerid); else { SendXPError(playerid,45000); }
  872. case 14: if(pInfo[playerid][pXP] >= 50000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = FEDERALAGENT,setClass(playerid); else { SendXPError(playerid,50000); }
  873. case 15: if(pInfo[playerid][pXP] >= 100000) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = ADVANCEDSCOUT,setClass(playerid); else { SendXPError(playerid,100000); }
  874. case 16: if(pInfo[playerid][pRank] >= 22) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = DOCTOR,setClass(playerid); else { SendClientMessage(playerid,-1,""chat""COL_PINK" You need to be rank 22+ to use this"); }
  875. }
  876. }
  877. }
  878.  
  879. case DIALOG_CLASS_3:
  880. {
  881. if(response)
  882. {
  883. switch(listitem)
  884. {
  885. case 0: if(pInfo[playerid][pXP] >= 0) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = STANDARDZOMBIE,setClass(playerid); else { SendXPError(playerid,0); }
  886. case 1: if(pInfo[playerid][pXP] >= 500) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = MUTATEDZOMBIE,setClass(playerid); else { SendXPError(playerid,500); }
  887. case 2: if(pInfo[playerid][pXP] >= 5000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = FASTZOMBIE,setClass(playerid); else { SendXPError(playerid,5000); }
  888. case 3: if(pInfo[playerid][pXP] >= 10000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = REAPERZOMBIE,setClass(playerid); else { SendXPError(playerid,10000); }
  889. case 4: if(pInfo[playerid][pXP] >= 18000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = WITCHZOMBIE,setClass(playerid); else { SendXPError(playerid,18000); }
  890. case 5: if(pInfo[playerid][pXP] >= 20000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = BOOMERZOMBIE,setClass(playerid); else { SendXPError(playerid,20000); }
  891. case 6: if(pInfo[playerid][pXP] >= 25000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = STOMPERZOMBIE,setClass(playerid); else { SendXPError(playerid,25000); }
  892. case 7: if(pInfo[playerid][pXP] >= 35000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = SCREAMERZOMBIE,setClass(playerid); else { SendXPError(playerid,35000); }
  893. case 8: if(pInfo[playerid][pXP] >= 65000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDMUTATED,setClass(playerid); else { SendXPError(playerid,65000); }
  894. case 9: if(pInfo[playerid][pXP] >= 70000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDSCREAMER,setClass(playerid); else { SendXPError(playerid,70000); }
  895. case 10: if(pInfo[playerid][pXP] >= 100000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = FLESHEATER,setClass(playerid); else { SendXPError(playerid,100000); }
  896. case 11: if(pInfo[playerid][pXP] >= 150000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDWITCH,setClass(playerid); else { SendXPError(playerid,150000); }
  897. case 12: if(pInfo[playerid][pXP] >= 500000) pInfo[playerid][pZombieClass] = 0,pInfo[playerid][pZombieClass] = ADVANCEDBOOMER,setClass(playerid); else { SendXPError(playerid,500000); }
  898. }
  899. }
  900. }
  901.  
  902. case DIALOG_REPORT:
  903. {
  904. if(response)
  905. {
  906. switch(listitem)
  907. {
  908. case 0: pubstring = "Racism",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  909. case 1: pubstring = "Offensive Language",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  910. case 2: pubstring = "Airbraking",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  911. case 3: pubstring = "Health Hacks",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  912. case 4: pubstring = "Armour Hacks",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  913. case 5: pubstring = "Weapon Hacks",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  914. case 6: pubstring = "Spawn Killing",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  915. case 7: pubstring = "Bug Abusing",ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Final Part","Enter the ID you are trying to report!","Report","");
  916. }
  917. }
  918. }
  919.  
  920. case DIALOG_REPORT_2:
  921. {
  922. new reportedID;
  923. reportedID = strval(inputtext);
  924. if(reportedID >= 101)
  925. {
  926. ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Invalid ID","Enter the ID you are trying to report!","Report","");
  927. }
  928. else
  929. {
  930. if(IsPlayerConnected(reportedID))
  931. {
  932. new string[256];
  933. format(string,sizeof(string),""COL_PINK"Player %s(%d) has reported %s(%d) for %s",PlayerName(playerid),playerid,PlayerName(reportedID),reportedID,pubstring);
  934. SendMessageToAllAdmins(string, -1);
  935. }
  936. else return ShowPlayerDialog(playerid,DIALOG_REPORT_2,DIALOG_STYLE_INPUT,"Invalid ID","Enter the ID you are trying to report!","Report","");
  937. }
  938. }
  939.  
  940. case DIALOG_SHOUT:
  941. {
  942. if(response)
  943. {
  944. switch(listitem)
  945. {
  946. case 0: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts MEDIC!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  947. case 1: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts BOOMER INCOMING!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  948. case 2: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts SCREAMER INCOMING!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  949. case 3: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts STOMPER INCOMING!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  950. case 4: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts it's clear!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  951. case 5: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts Zombies Nearby!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  952. case 6: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts ZOMBIES INCOMING!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  953. case 7: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts Need assistance!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  954. case 8: format(shoutstring,sizeof(shoutstring),""chat""COL_LIGHTBLUE" %s Shouts Need backup!",PlayerName(playerid)), SendHMessage(shoutstring,-1);
  955. }
  956. }
  957. }
  958.  
  959. case DIALOG_VIP:
  960. {
  961. if(response)
  962. {
  963. switch(listitem)
  964. {
  965. case 0: if(pInfo[playerid][pVipLevel] >= 1) SendPlayerMaxAmmo(playerid),SendClientMessage(playerid,-1,""chat""COL_PINK" You have all your weapons max'ed ammo!"); else { SendVipError(playerid,1); }
  966. case 1: if(pInfo[playerid][pVipLevel] >= 1) GivePlayerWeapon(playerid,31,150),GivePlayerWeapon(playerid,24,100),GivePlayerWeapon(playerid,25,600); else { SendVipError(playerid,1); }
  967. case 2: if(pInfo[playerid][pVipLevel] >= 3) ShowPlayerDialog(playerid,DIALOG_VIP_CLASS,DIALOG_STYLE_LIST,"Vip Classes (Human)","Vip Engineer (LVL 3)\nVip Medic (LVL 4)\nVip Scout (LVL 4)","Select","Close"); else { SendVipError(playerid,3); }
  968. case 3: if(pInfo[playerid][pVipLevel] >= 3) pInfo[playerid][pVipKickBack] = 1,SendClientMessage(playerid,-1,""chat""COL_LGREEN" You've enabled VIP kick back!"); else { SendVipError(playerid,3); }
  969. case 4: if(pInfo[playerid][pVipLevel] >= 3) pInfo[playerid][pVipKickBack] = 0,SendClientMessage(playerid,-1,""chat""COL_LGREEN" You've disabled VIP kick back!"); else { SendVipError(playerid,3); }
  970. case 5: if(pInfo[playerid][pVipLevel] >= 2) SetPlayerAttachedObject(playerid,0,19142,1,0.028000,0.034000,0.000000,0.000000,0.000000,0.000000,1.063000,1.191999,1.285999); else { SendVipError(playerid,2); }
  971. case 6: if(pInfo[playerid][pVipLevel] >= 4) pInfo[playerid][pVipFlash] = 1,SendClientMessage(playerid,-1,""chat""COL_LGREEN" Your name is now flashing!"); else { SendVipError(playerid,4); }
  972. case 7: if(pInfo[playerid][pVipLevel] >= 4) pInfo[playerid][pVipFlash] = 0,SendClientMessage(playerid,-1,""chat""COL_LGREEN" Your name has stopped flashing"); else { SendVipError(playerid,4); }
  973. case 8: if(pInfo[playerid][pVipLevel] >= 4) SetPlayerArmour(playerid,50.0),SendClientMessage(playerid,-1,""chat""COL_LGREEN" You've got 50.0f VIP Armour"); else { SendVipError(playerid,4); }
  974. }
  975. }
  976. }
  977.  
  978. case DIALOG_VIP_CLASS:
  979. {
  980. if(response)
  981. {
  982. if(team[playerid] == TEAM_HUMAN)
  983. {
  984. switch(listitem)
  985. {
  986. case 0: if(pInfo[playerid][pVipLevel] >= 3) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = VIPENGINEER,setClass(playerid); else { SendVipError(playerid,3); }
  987. case 1: if(pInfo[playerid][pVipLevel] >= 4) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = VIPMEDIC,setClass(playerid); else { SendVipError(playerid,4); }
  988. case 2: if(pInfo[playerid][pVipLevel] >= 4) pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = VIPSCOUT,setClass(playerid); else { SendVipError(playerid,4); }
  989.  
  990. }
  991. }
  992. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You must be a human to use VIP classes!");
  993. }
  994. }
  995.  
  996. case DIALOG_COINS:
  997. {
  998. if(response)
  999. {
  1000. if(team[playerid] == TEAM_HUMAN)
  1001. {
  1002. switch(listitem)
  1003. {
  1004. case 0: if(pInfo[playerid][pCoins] >= 45) pInfo[playerid][pCoins] -= 45,pInfo[playerid][pKickBackCoin] = 1; else { SendCoinError(playerid,45); }
  1005. case 1: if(pInfo[playerid][pCoins] >= 40) pInfo[playerid][pCoins] -= 40,pInfo[playerid][pDamageShotgunCoin] = 1; else { SendCoinError(playerid,40); }
  1006. case 2: if(pInfo[playerid][pCoins] >= 50) pInfo[playerid][pCoins] -= 50,pInfo[playerid][pDamageDeagleCoin] = 1; else { SendCoinError(playerid,50); }
  1007. case 3: if(pInfo[playerid][pCoins] >= 30) pInfo[playerid][pCoins] -= 30,pInfo[playerid][pDamageMP5Coin] = 1; else { SendCoinError(playerid,30); }
  1008. case 4: if(pInfo[playerid][pCoins] >= 25) pInfo[playerid][pCoins] -= 20,pInfo[playerid][pHumanClass] = 0,pInfo[playerid][pHumanClass] = FEDERALAGENT; else { SendCoinError(playerid,20); }
  1009. case 5: if(pInfo[playerid][pCoins] >= 30) pInfo[playerid][pCoins] -= 25,SetPlayerAttachedObject(playerid,0,19142,1,0.028000,0.034000,0.000000,0.000000,0.000000,0.000000,1.063000,1.191999,1.285999); else { SendCoinError(playerid,25); }
  1010. case 6: if(pInfo[playerid][pCoins] >= 800) pInfo[playerid][pCoins] -= 800,pInfo[playerid][pVipLevel] = 2; else { SendCoinError(playerid,800); }
  1011. }
  1012. }
  1013. }
  1014. }
  1015. }
  1016. return 1;
  1017. }
  1018.  
  1019. public OnPlayerDeath(playerid, killerid, reason)
  1020. {
  1021. new string[256],gunname[32];
  1022.  
  1023. SendDeathMessage(killerid, playerid, reason);
  1024. playersAliveCount--;
  1025.  
  1026. pInfo[playerid][pDeaths]++;
  1027. pInfo[playerid][Killstreak] = 0;
  1028.  
  1029. if(pInfo[playerid][IsPlayerInfected] == 1)
  1030. {
  1031. ZombieSetup(playerid);
  1032. CurePlayer(playerid);
  1033. printf("Infected human works!");
  1034. }
  1035.  
  1036. if(team[playerid] == TEAM_HUMAN)
  1037. {
  1038. ZombieSetup(playerid);
  1039. printf("Suicide human works!");
  1040. }
  1041.  
  1042. pInfo[killerid][pKills]++;
  1043. pInfo[killerid][Killstreak]++;
  1044. pInfo[playerid][pDeaths]++;
  1045. pInfo[playerid][Killstreak] = 0;
  1046.  
  1047. switch(Map[XPType])
  1048. {
  1049. case 1:
  1050. {
  1051. switch(random(2))
  1052. {
  1053. case 0: GivePlayerXP(killerid,10);
  1054. case 1: GivePlayerXP(killerid,20);
  1055. }
  1056. }
  1057.  
  1058. case 2:
  1059. {
  1060. switch(random(2))
  1061. {
  1062. case 0: GivePlayerXP(killerid,20);
  1063. case 1: GivePlayerXP(killerid,30);
  1064. }
  1065. }
  1066.  
  1067. case 3:
  1068. {
  1069. switch(random(2))
  1070. {
  1071. case 0: GivePlayerXP(killerid,30);
  1072. case 1: GivePlayerXP(killerid,40);
  1073. }
  1074. }
  1075.  
  1076. case 4:
  1077. {
  1078. switch(random(2))
  1079. {
  1080. case 0: GivePlayerXP(killerid,40);
  1081. case 1: GivePlayerXP(killerid,50);
  1082. }
  1083. }
  1084. }
  1085.  
  1086. if(pInfo[killerid][pVipLevel] >= 1)
  1087. {
  1088. switch(Map[XPType])
  1089. {
  1090. case 1:
  1091. {
  1092. switch(random(2))
  1093. {
  1094. case 0: GivePlayerXP(killerid,15),SendClientMessage(killerid,-1,""chat" Earned 15 XP from VIP Double XP! + normal xp 10 = 25 xp total");
  1095. case 1: GivePlayerXP(killerid,25),SendClientMessage(killerid,-1,""chat" Earned 25 XP from VIP Double XP! + normal xp 20 = 45 xp total");
  1096. }
  1097. }
  1098.  
  1099. case 2:
  1100. {
  1101. switch(random(2))
  1102. {
  1103. case 0: GivePlayerXP(killerid,25),SendClientMessage(killerid,-1,""chat" Earned 25 XP from VIP Double XP! + double xp 20 = 45 xp total");
  1104. case 1: GivePlayerXP(killerid,35),SendClientMessage(killerid,-1,""chat" Earned 35 XP from VIP Double XP! + double xp 30 = 65 xp total");
  1105. }
  1106. }
  1107.  
  1108. case 3:
  1109. {
  1110. switch(random(2))
  1111. {
  1112. case 0: GivePlayerXP(killerid,35),SendClientMessage(killerid,-1,""chat" Earned 35 XP from VIP Double XP! + triple xp 30 = 65 xp total");
  1113. case 1: GivePlayerXP(killerid,45),SendClientMessage(killerid,-1,""chat" Earned 45 XP from VIP Double XP! + triple xp 40 = 85 xp total");
  1114. }
  1115. }
  1116.  
  1117. case 4:
  1118. {
  1119. switch(random(2))
  1120. {
  1121. case 0: GivePlayerXP(killerid,55),SendClientMessage(killerid,-1,""chat" Earned 55 XP from VIP Double XP! + quad xp 40 = 95 xp total");
  1122. case 1: GivePlayerXP(killerid,65),SendClientMessage(killerid,-1,""chat" Earned 65 XP from VIP Double XP! + quad xp 50 = 115 xp total");
  1123. }
  1124. }
  1125. }
  1126. }
  1127.  
  1128. if(team[killerid] == TEAM_ZOMBIE)
  1129. {
  1130. if(reason == 9)
  1131. {
  1132. ZombieSetup(playerid);
  1133. printf("Zombie killed human works");
  1134. }
  1135. }
  1136.  
  1137. KillTimer(pInfo[playerid][IsPlayerInfectedTimer]);
  1138.  
  1139. GetWeaponName(reason,gunname,sizeof(gunname));
  1140. format(string,sizeof(string),"You have killed~r~ %s~w~ with an %s",PlayerName(playerid),gunname);
  1141. TextDrawSetString(iKilled[killerid],string);
  1142. TextDrawShowForPlayer(killerid, iKilled[killerid]);
  1143. SetTimerEx("HideiKilled", 3000, 0, "i", killerid);
  1144.  
  1145. if(killerid != INVALID_PLAYER_ID)
  1146. {
  1147. if(!PlayerShotPlayer[killerid][playerid])
  1148. {
  1149. new Admin[24] = "Anti-cheat";
  1150. new reason3[128] = "Fake Killing";
  1151. BanPlayer(playerid,reason3,Admin);
  1152. }
  1153. }
  1154.  
  1155. foreach(Player,i)
  1156. {
  1157. PlayerShotPlayer[i][playerid] = 0;
  1158. }
  1159.  
  1160. new Float:x,Float:y,Float:z;
  1161. if(team[playerid] == TEAM_ZOMBIE)
  1162. {
  1163. GetPlayerPos(playerid,Float:x,Float:y,Float:z);
  1164. meatDrops[playerid] = CreatePickup(2804,19,Float:x,Float:y,Float:z,0);
  1165.  
  1166. if(pInfo[playerid][pZombieClass] == BOOMERZOMBIE)
  1167. {
  1168. GetPlayerPos(playerid,Float:x,Float:y,Float:z);
  1169. CreateExplosion(Float:x,Float:y,Float:z,0,6.0);
  1170. foreach(Player,i)
  1171. {
  1172. GetClosestPlayer(i);
  1173. if(IsPlayerConnected(i))
  1174. {
  1175. switch(GetPlayerSkin(i))
  1176. {
  1177. case NON_IMMUNE:
  1178. {
  1179. if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
  1180. {
  1181. if(pInfo[i][IsPlayerInfected] == 0)
  1182. {
  1183. InfectPlayerStandard(i);
  1184. }
  1185. }
  1186. }
  1187. }
  1188. }
  1189. }
  1190. }
  1191. }
  1192.  
  1193. new kstring[256];
  1194. switch(pInfo[killerid][Killstreak])
  1195. {
  1196. case 5: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 5 killstreak "COL_WHITE"(+50 XP) (1 Coin)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 50,pInfo[killerid][pCoins] += 1;
  1197. case 10: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 10 killstreak "COL_WHITE"(+80 XP) (2 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 80,pInfo[killerid][pCoins] += 2;
  1198. case 15: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 15 killstreak "COL_WHITE"(+100 XP) (3 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 100,pInfo[killerid][pCoins] += 3;
  1199. case 20: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 20 killstreak "COL_WHITE"(+150 XP) (4 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 150,pInfo[killerid][pCoins] += 4;
  1200. case 25: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 25 killstreak "COL_WHITE"(+200 XP) (5 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 200,pInfo[killerid][pCoins] += 5;
  1201. case 30: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 30 killstreak "COL_WHITE"(+250 XP) (6 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 250,pInfo[killerid][pCoins] += 6;
  1202. case 35: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 35 killstreak "COL_WHITE"(+350 XP) (7 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 350,pInfo[killerid][pCoins] += 7;
  1203. case 40: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 40 killstreak "COL_WHITE"(+500 XP) (8 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 500,pInfo[killerid][pCoins] += 8;
  1204. case 45: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 45 killstreak "COL_WHITE"(+600 XP) (9 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 600,pInfo[killerid][pCoins] += 9;
  1205. case 50: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 50 killstreak "COL_WHITE"(+800 XP) (10 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 800,pInfo[killerid][pCoins] += 10;
  1206. case 55: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 55 killstreak "COL_WHITE"(+950 XP) (11 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 950,pInfo[killerid][pCoins] += 11;
  1207. case 60: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 60 killstreak "COL_WHITE"(+1000 XP) (12 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1000,pInfo[killerid][pCoins] += 12;
  1208. case 65: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 65 killstreak "COL_WHITE"(+1200 XP) (13 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1200,pInfo[killerid][pCoins] += 13;
  1209. case 70: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 70 killstreak "COL_WHITE"(+1500 XP) (14 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1500,pInfo[killerid][pCoins] += 14;
  1210. case 75: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 75 killstreak "COL_WHITE"(+1600 XP) (15 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1600,pInfo[killerid][pCoins] += 15;
  1211. case 80: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 80 killstreak "COL_WHITE"(+1800 XP) (16 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1800,pInfo[killerid][pCoins] += 16;
  1212. case 85: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 85 killstreak "COL_WHITE"(+1900 XP) (17 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 1900,pInfo[killerid][pCoins] += 17;
  1213. case 90: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 90 killstreak "COL_WHITE"(+2000 XP) (18 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 2000,pInfo[killerid][pCoins] += 18;
  1214. case 95: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 95 killstreak "COL_WHITE"(+5000 XP) (19 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 5000,pInfo[killerid][pCoins] += 19;
  1215. case 100: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 100 killstreak "COL_WHITE"(+5500 XP) (20 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 5500,pInfo[killerid][pCoins] += 20;
  1216. case 105: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 105 killstreak "COL_WHITE"(+6000 XP) (21 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 6000,pInfo[killerid][pCoins] += 21;
  1217. case 110: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 110 killstreak "COL_WHITE"(+6500 XP) (22 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 6500,pInfo[killerid][pCoins] += 22;
  1218. case 115: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 115 killstreak "COL_WHITE"(+7000 XP) (23 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 7000,pInfo[killerid][pCoins] += 23;
  1219. case 120: format(kstring,sizeof(kstring),""chat""COL_PINK" %s has achieved a 120 killstreak "COL_WHITE"(+7500 XP) (24 Coins)",PlayerName(killerid)), SendClientMessageToAll(-1,kstring), pInfo[killerid][pXP] += 7500,pInfo[killerid][pCoins] += 24;
  1220. }
  1221.  
  1222. if(team[killerid] == TEAM_HUMAN)
  1223. {
  1224. if(GetPlayerSkin(killerid) == 0)
  1225. {
  1226. new Admin[24] = "Anti-cheat";
  1227. new reason3[128] = "Skin Hack (SI 0)";
  1228. BanPlayer(killerid,reason3,Admin);
  1229. }
  1230. }
  1231.  
  1232. hideTextdrawsAfterConnect(playerid);
  1233. CheckToLevelOrRankUp(killerid);
  1234. return 1;
  1235. }
  1236.  
  1237. public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
  1238. {
  1239. PlayerShotPlayer[issuerid][playerid] = 1;
  1240.  
  1241. if(team[issuerid] == TEAM_HUMAN)
  1242. {
  1243. if(pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pVipKickBack] == 1 || pInfo[issuerid][pKickBackCoin])
  1244. {
  1245. if(team[playerid] == TEAM_ZOMBIE)
  1246. {
  1247. if(weaponid == 23 || weaponid == 25 || weaponid == 24 || weaponid == 34 || weaponid == 31)
  1248. {
  1249. new Float:x,Float:y,Float:z,Float:angle;
  1250. GetPlayerFacingAngle(playerid,Float:angle);
  1251. GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
  1252.  
  1253. SetPlayerVelocity(playerid,Float:x+0.1,Float:y+0.1,Float:z+0.2);
  1254. SetPlayerFacingAngle(playerid,Float:angle);
  1255. }
  1256. }
  1257. }
  1258. }
  1259.  
  1260. if(team[issuerid] == TEAM_HUMAN)
  1261. {
  1262. if(pInfo[issuerid][pHumanClass] == VIPSCOUT)
  1263. {
  1264. if(team[playerid] == TEAM_ZOMBIE)
  1265. {
  1266. if(weaponid == 34)
  1267. {
  1268. SetPlayerHealth(playerid, -0);
  1269. }
  1270. }
  1271. }
  1272. }
  1273.  
  1274. if(team[issuerid] == TEAM_HUMAN)
  1275. {
  1276. if(pInfo[issuerid][pHumanClass] == SCOUT || pInfo[issuerid][pHumanClass] == HEAVYSHOTGUN || pInfo[issuerid][pHumanClass] == KICKBACK || pInfo[issuerid][pDamageShotgunCoin] == 1)
  1277. {
  1278. if(team[playerid] == TEAM_ZOMBIE)
  1279. {
  1280. if(weaponid == 34 || 25)
  1281. {
  1282. new Float:hp;
  1283. GetPlayerHealth(playerid,hp);
  1284. SetPlayerHealth(playerid, hp - 45);
  1285. }
  1286. }
  1287. }
  1288. }
  1289.  
  1290. if(team[issuerid] == TEAM_HUMAN)
  1291. {
  1292. if(pInfo[issuerid][pDamageMP5Coin] == 1 || pInfo[issuerid][pDamageDeagleCoin] == 1)
  1293. {
  1294. if(team[playerid] == TEAM_ZOMBIE)
  1295. {
  1296. if(weaponid == 24 || 29)
  1297. {
  1298. new Float:hp;
  1299. GetPlayerHealth(playerid,hp);
  1300. SetPlayerHealth(playerid, hp - 45);
  1301. }
  1302. }
  1303. }
  1304. }
  1305. return 1;
  1306. }
  1307.  
  1308. public OnPlayerText(playerid, text[])
  1309. {
  1310. if(GetPVarInt(playerid, "SPS Muted") == 0)
  1311. {
  1312. SetPVarInt(playerid, "SPS Messages Sent", GetPVarInt(playerid, "SPS Messages Sent") + 1);
  1313. SetTimerEx("SPS_Remove_Messages_Limit", 1500, 0, "i", playerid);
  1314.  
  1315. if(GetPVarInt(playerid, "SPS Messages Sent") >= 4)
  1316. {
  1317. if(!(((GetPVarInt(playerid, "SPS Spam Warnings") + 2) == 3)))
  1318. {
  1319. SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" Please, do not spam.");
  1320. }
  1321. SetPVarInt(playerid, "SPS Spam Warnings", GetPVarInt(playerid, "SPS Spam Warnings") + 1);
  1322. }
  1323.  
  1324. if(pInfo[playerid][pLogged] == 1)
  1325. {
  1326. new stringbig[356];
  1327. if(pInfo[playerid][IsPlayerMuted] == 1) {
  1328. SendClientMessage(playerid,-1,""chat" You are muted");
  1329. return 0;
  1330. }
  1331.  
  1332. format(stringbig,sizeof(stringbig),"(%d): %s",playerid, text);
  1333. SendPlayerMessageToAll(playerid,stringbig);
  1334.  
  1335. if(strfind(text, ":", true) != -1) {
  1336. new i_numcount, i_period, i_pos;
  1337. while(text[i_pos]) {
  1338. if('0' <= text[i_pos] <= '9') i_numcount ++;
  1339. else if(text[i_pos] == '.') i_period ++;
  1340. i_pos++;
  1341. }
  1342. if(i_numcount >= 8 && i_period >= 3) {
  1343. new reason[128];
  1344. new Admin[24] = "Anti-Cheat";
  1345. format(reason,sizeof(reason),"Advertisement %s",text);
  1346.  
  1347. BanPlayer(playerid,reason,Admin);
  1348. return 0;
  1349. }
  1350. }
  1351. }
  1352. }
  1353. else
  1354. {
  1355. SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You are muted, you can't talk.");
  1356. return 0;
  1357. }
  1358. return 0;
  1359. }
  1360.  
  1361. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1362. {
  1363. if(pInfo[playerid][pAdminLevel] >= 5)
  1364. {
  1365. SendClientMessage(playerid,-1,""chat" Welcome");
  1366. }
  1367. else
  1368. {
  1369. new Float:posxx[3];
  1370. GetPlayerPos(playerid, posxx[0], posxx[1], posxx[2]);
  1371. SetPlayerPos(playerid, posxx[0], posxx[1], posxx[2]+2);
  1372. }
  1373. return 1;
  1374. }
  1375.  
  1376. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1377. {
  1378. if(PRESSED(KEY_FIRE))
  1379. {
  1380. switch(GetPlayerWeapon(playerid))
  1381. {
  1382. case 2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,26,27,28,32,35,36,37,38,39,40,41,42,43,44,45,46:
  1383. {
  1384. new reason[128];
  1385. new Admin[24] = "Anti-cheat";
  1386. format(reason,sizeof(reason),"Weapon hack %i",GetPlayerWeapon(playerid));
  1387. BanPlayer(playerid,reason,Admin);
  1388. }
  1389. }
  1390. }
  1391.  
  1392. if(PRESSED(KEY_FIRE))
  1393. {
  1394. if(team[playerid] == TEAM_HUMAN)
  1395. {
  1396. switch(GetPlayerWeapon(playerid))
  1397. {
  1398. case 9: ShowPlayerDialog(playerid,DIALOG_KICK,DIALOG_STYLE_MSGBOX,"Kicked for bugged","You have been kicked for chainsaw bug reconnect to solve the problem","Leave",""),Kick(playerid);
  1399. }
  1400. }
  1401. }
  1402.  
  1403. if(PRESSED(KEY_YES))
  1404. {
  1405. if(team[playerid] == TEAM_HUMAN)
  1406. {
  1407. if(gettime() - 8 < Abilitys[playerid][ShoutCooldown]) return GameTextForPlayer(playerid,"~w~ Cannot shout wait 8 seconds!",1000,5);
  1408. {
  1409. ShowPlayerDialog(playerid,DIALOG_SHOUT,DIALOG_STYLE_LIST,"Select an shout!","Medic\nBoomer Incoming\nScreamer Incoming\nStomper Incoming\nIt's clear\nZOMBIES NEARBY!\nZOMBIES INCOMING\nNeed assistance\nNeed backup","Select","Cancel");
  1410. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1411. Abilitys[playerid][ShoutCooldown] = gettime();
  1412. }
  1413. }
  1414. }
  1415.  
  1416. if(PRESSED(KEY_WALK))
  1417. {
  1418. if(team[playerid] == TEAM_HUMAN)
  1419. {
  1420. if(pInfo[playerid][pHumanClass] == E_ENGINEER)
  1421. {
  1422. new Float:pz, Float:x, Float:y, Float:z;
  1423. GetPlayerFacingAngle(playerid, pz);
  1424. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1425.  
  1426. if(pInfo[playerid][pLadders] >= 1)
  1427. {
  1428. new string[128];
  1429. pInfo[playerid][pLadders] -= 1;
  1430. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1431. CreateObject(1437,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1432. format(string,sizeof(string),""chat" You have %i ladders left",pInfo[playerid][pLadders]);
  1433. SendClientMessage(playerid,-1,string);
  1434. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1435. }
  1436. else return SendClientMessage(playerid,-1,""chat" You ran out of Ladders!");
  1437. }
  1438. }
  1439. }
  1440.  
  1441. if(PRESSED(KEY_WALK))
  1442. {
  1443. if(team[playerid] == TEAM_HUMAN)
  1444. {
  1445. if(pInfo[playerid][pHumanClass] == VIPENGINEER)
  1446. {
  1447. new Float:pz, Float:x, Float:y, Float:z;
  1448. GetPlayerFacingAngle(playerid, pz);
  1449. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1450.  
  1451. if(pInfo[playerid][pVipBoxes] >= 1)
  1452. {
  1453. new string[128];
  1454. pInfo[playerid][pVipBoxes] -= 1;
  1455. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1456. CreateObject(1421,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1457. format(string,sizeof(string),""chat" You have %i boxes left",pInfo[playerid][pVipBoxes]);
  1458. SendClientMessage(playerid,-1,string);
  1459. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1460. }
  1461. else return SendClientMessage(playerid,-1,""chat" You ran out of boxes!");
  1462. }
  1463. }
  1464. }
  1465.  
  1466. if(PRESSED(KEY_WALK))
  1467. {
  1468. if(team[playerid] == TEAM_HUMAN)
  1469. {
  1470. if(pInfo[playerid][pHumanClass] == ENGINEER)
  1471. {
  1472. new Float:pz, Float:x, Float:y, Float:z;
  1473. GetPlayerFacingAngle(playerid, pz);
  1474. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1475.  
  1476. if(pInfo[playerid][Boxes] >= 1)
  1477. {
  1478. new string[128];
  1479. pInfo[playerid][Boxes] -= 1;
  1480. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1481. CreateObject(1421,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1482. format(string,sizeof(string),""chat" You have %i boxes left",pInfo[playerid][Boxes]);
  1483. SendClientMessage(playerid,-1,string);
  1484. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1485. }
  1486. else return SendClientMessage(playerid,-1,""chat" You ran out of boxes!");
  1487. }
  1488. }
  1489. }
  1490.  
  1491. if(PRESSED(KEY_WALK))
  1492. {
  1493. if(team[playerid] == TEAM_HUMAN)
  1494. {
  1495. if(pInfo[playerid][pHumanClass] == ADVANCEDENGINEER)
  1496. {
  1497. new Float:pz, Float:x, Float:y, Float:z;
  1498. GetPlayerFacingAngle(playerid, pz);
  1499. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1500.  
  1501. if(pInfo[playerid][BoxesAdvanced] >= 1)
  1502. {
  1503. new string[128];
  1504. pInfo[playerid][BoxesAdvanced] -= 1;
  1505. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1506. CreateObject(1421,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1507. format(string,sizeof(string),""chat" You have %i boxes left",pInfo[playerid][BoxesAdvanced]);
  1508. SendClientMessage(playerid,-1,string);
  1509. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1510. }
  1511. else return SendClientMessage(playerid,-1,""chat" You ran out of boxes!");
  1512. }
  1513. }
  1514. }
  1515.  
  1516. if(PRESSED(KEY_WALK))
  1517. {
  1518. if(team[playerid] == TEAM_HUMAN)
  1519. {
  1520. if(pInfo[playerid][pHumanClass] == DOCTOR)
  1521. {
  1522. new Float:pz, Float:x, Float:y, Float:z;
  1523. GetPlayerFacingAngle(playerid, pz);
  1524. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1525.  
  1526. if(pInfo[playerid][pDoctorShield] >= 1)
  1527. {
  1528. new string[128];
  1529. pInfo[playerid][pDoctorShield] -= 1;
  1530. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1531. DocShield = CreateObject(3534,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1532. format(string,sizeof(string),""chat" You have %i Doctor shields left",pInfo[playerid][pDoctorShield]);
  1533. SendClientMessage(playerid,-1,string);
  1534. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1535. }
  1536. else return SendClientMessage(playerid,-1,""chat" You ran out of shields!");
  1537. }
  1538. }
  1539. }
  1540.  
  1541. if(PRESSED(KEY_WALK))
  1542. {
  1543. if(team[playerid] == TEAM_HUMAN)
  1544. {
  1545. if(pInfo[playerid][pHumanClass] == ASSASSIN)
  1546. {
  1547. new Float:pz, Float:x, Float:y, Float:z;
  1548. GetPlayerFacingAngle(playerid, pz);
  1549. GetPlayerPos(playerid, Float:x, Float:y, Float:z);
  1550.  
  1551. if(pInfo[playerid][C4] >= 1)
  1552. {
  1553. new string[128];
  1554. pInfo[playerid][C4] -= 1;
  1555. GetXYInFrontOfPlayer(playerid, Float:x,Float:y, 1.0);
  1556. ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 2000);
  1557. c4Obj[playerid] = CreateObject(1654,Float:x,Float:y,Float:z,0.0,0.0,pz,500.0);
  1558. format(string,sizeof(string),""chat" You have %i C4's left",pInfo[playerid][C4]);
  1559. SendClientMessage(playerid,-1,string);
  1560.  
  1561. GameTextForPlayer(playerid,"~n~~n~~n~~n~~g~Planted c4 exploded in 10 seconds",3500,5);
  1562. SetTimerEx("C4Explode",10000,0,"i",playerid);
  1563. GivePlayerXP(playerid,5);
  1564. PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
  1565. }
  1566. else return SendClientMessage(playerid,-1,""chat" You ran out of c4's!");
  1567. }
  1568. }
  1569. }
  1570.  
  1571. if(PRESSED(KEY_WALK))
  1572. {
  1573. if(team[playerid] == TEAM_ZOMBIE)
  1574. {
  1575. if(pInfo[playerid][pZombieClass] == STOMPERZOMBIE)
  1576. {
  1577. if(gettime() - 6 < Abilitys[playerid][StomperPushing]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1578. {
  1579. new Float:x,Float:y,Float:z,Float:Angle;
  1580. GetPlayerPos(playerid,Float:x,Float:y,Float:z);
  1581. GetPlayerFacingAngle(playerid,Float:Angle);
  1582. foreach(Player,i)
  1583. {
  1584. switch(GetPlayerSkin(i))
  1585. {
  1586. case NON_IMMUNE,163,70:
  1587. {
  1588. if(GetDistanceBetweenPlayers(playerid,i) < 6.0)
  1589. {
  1590. GetClosestPlayer(i);
  1591. GetPlayerFacingAngle(i,Float:Angle);
  1592. GetPlayerVelocity(i,Float:x,Float:y,Float:z);
  1593. SetPlayerVelocity(i,Float:x+0.3,Float:y+0.3,Float:z+0.2);
  1594. SetPlayerFacingAngle(i,Float:Angle);
  1595. GivePlayerXP(playerid,20);
  1596. Abilitys[playerid][StomperPushing] = gettime();
  1597. }
  1598. }
  1599. }
  1600. }
  1601. }
  1602. }
  1603. }
  1604. }
  1605.  
  1606. if(PRESSED(KEY_WALK))
  1607. {
  1608. if(team[playerid] == TEAM_ZOMBIE)
  1609. {
  1610. if(pInfo[playerid][pZombieClass] == ADVANCEDMUTATED)
  1611. {
  1612. if(gettime() - 10 < Abilitys[playerid][AdvancedMutatedCooldown]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1613. {
  1614. foreach(Player,i)
  1615. {
  1616. switch(GetPlayerSkin(i))
  1617. {
  1618. case NON_IMMUNE:
  1619. {
  1620. if(GetDistanceBetweenPlayers(playerid,i) < 6.5)
  1621. {
  1622. if(pInfo[i][IsPlayerInfected] == 0)
  1623. {
  1624. InfectPlayerStandard(i);
  1625. GivePlayerXP(playerid,20);
  1626. Abilitys[playerid][AdvancedMutatedCooldown] = gettime();
  1627. }
  1628. }
  1629. }
  1630. }
  1631. }
  1632. }
  1633. }
  1634. }
  1635. }
  1636.  
  1637. if(PRESSED(KEY_WALK))
  1638. {
  1639. if(team[playerid] == TEAM_ZOMBIE)
  1640. {
  1641. if(pInfo[playerid][pZombieClass] == SCREAMERZOMBIE)
  1642. {
  1643. if(gettime() - 9 < Abilitys[playerid][ScreamerZombieAb]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1644. {
  1645. foreach(Player,i)
  1646. {
  1647. switch(GetPlayerSkin(i))
  1648. {
  1649. case NON_IMMUNE:
  1650. {
  1651. if(GetDistanceBetweenPlayers(playerid,i) < 5.0)
  1652. {
  1653. GetClosestPlayer(i);
  1654. ApplyAnimation(i, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
  1655. GameTextForPlayer(i,"~n~~n~~n~~n~~g~Screamer Attacked",3500,5);
  1656. SetTimerEx("ScreamerClearAnim",1500,0,"i",i);
  1657. GivePlayerXP(playerid,15);
  1658. Abilitys[playerid][ScreamerZombieAb] = gettime();
  1659. }
  1660. }
  1661. }
  1662. }
  1663. }
  1664. }
  1665. }
  1666. }
  1667.  
  1668. if(PRESSED(KEY_WALK))
  1669. {
  1670. if(team[playerid] == TEAM_ZOMBIE)
  1671. {
  1672. if(pInfo[playerid][pZombieClass] == ADVANCEDSCREAMER)
  1673. {
  1674. if(gettime() - 12 < Abilitys[playerid][ScreamerZombieAb2]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1675. {
  1676. foreach(Player,i)
  1677. {
  1678. switch(GetPlayerSkin(i))
  1679. {
  1680. case NON_IMMUNE:
  1681. {
  1682. if(GetDistanceBetweenPlayers(playerid,i) < 8.0)
  1683. {
  1684. new Float:hp;
  1685. GetClosestPlayer(i);
  1686. ApplyAnimation(i, "PED", "BIKE_fall_off", 4.1, 0, 1, 1, 1, 0, 1);
  1687. GameTextForPlayer(i,"~n~~n~~n~~n~~g~Advanced Screamer Attacked",3500,5);
  1688. SetTimerEx("ScreamerClearAnim",1500,0,"i",i);
  1689. GivePlayerXP(playerid,20);
  1690. GetPlayerHealth(playerid,hp);
  1691. Abilitys[playerid][ScreamerZombieAb2] = gettime();
  1692. if(hp <= 80)
  1693. {
  1694. GetPlayerHealth(playerid,hp);
  1695. SetPlayerHealth(playerid,hp+10);
  1696. }
  1697. else return SendClientMessage(playerid,-1,""chat""COL_PINK" Screamed sucessfully but wasn't able to gain HP because you have enough HP (80)");
  1698. }
  1699. }
  1700. }
  1701. }
  1702. }
  1703. }
  1704. }
  1705. }
  1706.  
  1707. if(PRESSED(KEY_WALK))
  1708. {
  1709. if(team[playerid] == TEAM_HUMAN)
  1710. {
  1711. if(pInfo[playerid][pHumanClass] == ADVANCEDMEDIC)
  1712. {
  1713. new victimid = GetClosestPlayer(playerid);
  1714. if(IsPlayerConnected(victimid))
  1715. {
  1716. switch(GetPlayerSkin(victimid))
  1717. {
  1718. case NON_IMMUNE:
  1719. {
  1720. if(GetDistanceBetweenPlayers(playerid,victimid) < 10.0)
  1721. {
  1722. if(pInfo[victimid][IsPlayerInfected] == 1)
  1723. {
  1724. CurePlayer(victimid);
  1725. GivePlayerXP(playerid,20);
  1726. }
  1727. else return SendClientMessage(playerid,-1,""chat" No one around you is infected");
  1728. }
  1729. }
  1730. }
  1731. }
  1732. }
  1733. }
  1734. }
  1735.  
  1736. if(PRESSED(KEY_WALK))
  1737. {
  1738. if(team[playerid] == TEAM_ZOMBIE)
  1739. {
  1740. if(pInfo[playerid][pZombieClass] == FASTZOMBIE)
  1741. {
  1742. if(gettime() - 6 < Abilitys[playerid][HighJumpZombie]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1743. {
  1744. new Float:x,Float:y,Float:z;
  1745. GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
  1746. SetPlayerVelocity(playerid,Float:x,Float:y*1.0,Float:z+0.8* 1.2);
  1747. Abilitys[playerid][HighJumpZombie] = gettime();
  1748. }
  1749. }
  1750. }
  1751. }
  1752.  
  1753. if(PRESSED(KEY_WALK))
  1754. {
  1755. if(team[playerid] == TEAM_HUMAN)
  1756. {
  1757. if(pInfo[playerid][pHumanClass] == ADVANCEDSCOUT)
  1758. {
  1759. if(gettime() - 6 < Abilitys[playerid][HighJumpScout]) return GameTextForPlayer(playerid,"~w~ Still recovering",1000,5);
  1760. {
  1761. new Float:x,Float:y,Float:z;
  1762. GetPlayerVelocity(playerid,Float:x,Float:y,Float:z);
  1763. SetPlayerVelocity(playerid,Float:x,Float:y*0.9,Float:z+0.5* 0.9);
  1764. Abilitys[playerid][HighJumpScout] = gettime();
  1765. }
  1766. }
  1767. }
  1768. }
  1769.  
  1770. if(PRESSED(KEY_WALK))
  1771. {
  1772. if(team[playerid] == TEAM_ZOMBIE)
  1773. {
  1774. if(pInfo[playerid][pZombieClass] == WITCHZOMBIE)
  1775. {
  1776. new victimid = GetClosestPlayer(playerid);
  1777. if(IsPlayerConnected(victimid))
  1778. {
  1779. switch(GetPlayerSkin(victimid))
  1780. {
  1781. case NON_IMMUNE,70:
  1782. {
  1783. if(GetDistanceBetweenPlayers(playerid,victimid) < 1.5)
  1784. {
  1785. if(gettime() - 9 < Abilitys[playerid][WitchAttack]) return GameTextForPlayer(playerid,"~w~ Still recovering",4000,5);
  1786. {
  1787. new Float:hp,zmstring[256];
  1788. GetPlayerHealth(victimid,hp);
  1789. SetPlayerHealth(victimid, hp -45);
  1790. GameTextForPlayer(victimid,"~n~~n~~n~~n~~y~Witched attacked",3000,5);
  1791. GivePlayerXP(playerid,15);
  1792. format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been witch attacked by %s",PlayerName(victimid),PlayerName(playerid));
  1793. SendClientMessageToAll(-1,zmstring);
  1794. Abilitys[playerid][WitchAttack] = gettime();
  1795. }
  1796. }
  1797. }
  1798. }
  1799. }
  1800. }
  1801. }
  1802. }
  1803.  
  1804. if(PRESSED(KEY_WALK))
  1805. {
  1806. if(team[playerid] == TEAM_ZOMBIE)
  1807. {
  1808. if(pInfo[playerid][pZombieClass] == ADVANCEDWITCH)
  1809. {
  1810. new victimid = GetClosestPlayer(playerid);
  1811. if(IsPlayerConnected(victimid))
  1812. {
  1813. switch(GetPlayerSkin(victimid))
  1814. {
  1815. case NON_IMMUNE,70:
  1816. {
  1817. if(GetDistanceBetweenPlayers(playerid,victimid) < 1.5)
  1818. {
  1819. if(gettime() - 15 < Abilitys[playerid][WitchAttack2]) return GameTextForPlayer(playerid,"~w~ Still recovering",4000,5);
  1820. {
  1821. new Float:hp,zmstring[256];
  1822. GetPlayerHealth(victimid,hp);
  1823. SetPlayerHealth(victimid, hp -99);
  1824. GameTextForPlayer(victimid,"~n~~n~~n~~n~~y~Advanced Witched attacked",3000,5);
  1825. GivePlayerXP(playerid,15);
  1826. format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been advanced witch attacked by %s",PlayerName(victimid),PlayerName(playerid));
  1827. SendClientMessageToAll(-1,zmstring);
  1828. Abilitys[playerid][WitchAttack2] = gettime();
  1829. }
  1830. }
  1831. }
  1832. }
  1833. }
  1834. }
  1835. }
  1836. }
  1837.  
  1838. if(PRESSED(KEY_WALK))
  1839. {
  1840. if(team[playerid] == TEAM_ZOMBIE)
  1841. {
  1842. if(pInfo[playerid][pZombieClass] == STANDARDZOMBIE)
  1843. {
  1844. new victimid = GetClosestPlayer(playerid);
  1845. if(gettime() - 7 < Abilitys[playerid][InfectionNormal]) return GameTextForPlayer(playerid,"~b~ Still recovering",4000,5);
  1846. {
  1847. if(IsPlayerConnected(victimid))
  1848. {
  1849. switch(GetPlayerSkin(victimid))
  1850. {
  1851. case NON_IMMUNE:
  1852. {
  1853. if(GetDistanceBetweenPlayers(playerid,victimid) < 2.0)
  1854. {
  1855. if(pInfo[victimid][IsPlayerInfected] == 0)
  1856. {
  1857. new zmstring[256];
  1858. InfectPlayerStandard(victimid);
  1859. format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been infected by %s",PlayerName(victimid),PlayerName(playerid));
  1860. SendClientMessageToAll(-1,zmstring);
  1861. GivePlayerXP(playerid,20);
  1862. Abilitys[playerid][InfectionNormal] = gettime();
  1863. }
  1864. else return SendClientMessage(playerid,-1,""chat" Player is already infected!");
  1865. }
  1866. }
  1867. }
  1868. }
  1869. }
  1870. }
  1871. }
  1872. }
  1873.  
  1874. if(PRESSED(KEY_WALK))
  1875. {
  1876. if(team[playerid] == TEAM_ZOMBIE)
  1877. {
  1878. if(pInfo[playerid][pZombieClass] == MUTATEDZOMBIE)
  1879. {
  1880. new victimid = GetClosestPlayer(playerid);
  1881. if(gettime() - 7 < Abilitys[playerid][InfectionMutated]) return GameTextForPlayer(playerid,"~b~ Still recovering",4000,5);
  1882. {
  1883. if(IsPlayerConnected(victimid))
  1884. {
  1885. switch(GetPlayerSkin(victimid))
  1886. {
  1887. case NON_IMMUNE:
  1888. {
  1889. if(GetDistanceBetweenPlayers(playerid,victimid) < 1.7)
  1890. {
  1891. if(pInfo[victimid][IsPlayerInfected] == 0)
  1892. {
  1893. new zmstring[256];
  1894. InfectPlayerMutated(victimid);
  1895. format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been infected by %s",PlayerName(victimid),PlayerName(playerid));
  1896. SendClientMessageToAll(-1,zmstring);
  1897. GivePlayerXP(playerid,20);
  1898. Abilitys[playerid][InfectionMutated] = gettime();
  1899. }
  1900. else return SendClientMessage(playerid,-1,""chat" Player is already infected!");
  1901. }
  1902. }
  1903. }
  1904. }
  1905. }
  1906. }
  1907. }
  1908. }
  1909.  
  1910. if(PRESSED(KEY_WALK))
  1911. {
  1912. if(team[playerid] == TEAM_ZOMBIE)
  1913. {
  1914. if(pInfo[playerid][pZombieClass] == FLESHEATER)
  1915. {
  1916. new victimid = GetClosestPlayer(playerid);
  1917. if(gettime() - 18 < Abilitys[playerid][InfectionFleshEater]) return GameTextForPlayer(playerid,"~b~ Still recovering",4000,5);
  1918. {
  1919. if(IsPlayerConnected(victimid))
  1920. {
  1921. switch(GetPlayerSkin(victimid))
  1922. {
  1923. case NON_IMMUNE,285,70:
  1924. {
  1925. if(GetDistanceBetweenPlayers(playerid,victimid) < 1.7)
  1926. {
  1927. if(pInfo[victimid][IsPlayerInfected] == 0)
  1928. {
  1929. new zmstring[256];
  1930. InfectPlayerFleshEater(victimid);
  1931. format(zmstring,sizeof(zmstring), ""chat""COL_PINK" %s has been bitten and infected by %s",PlayerName(victimid),PlayerName(playerid));
  1932. SendClientMessageToAll(-1,zmstring);
  1933. GivePlayerXP(playerid,10);
  1934. Abilitys[playerid][InfectionFleshEater] = gettime();
  1935. }
  1936. else return SendClientMessage(playerid,-1,""chat" Player is already infected!");
  1937. }
  1938. }
  1939. }
  1940. }
  1941. }
  1942. }
  1943. }
  1944. }
  1945.  
  1946. if(PRESSED(KEY_WALK))
  1947. {
  1948. if(team[playerid] == TEAM_ZOMBIE)
  1949. {
  1950. if(pInfo[playerid][pZombieClass] == ADVANCEDBOOMER)
  1951. {
  1952. if(IsPlayerInRangeOfPoint(playerid,8.0,Map[ZombieSpawnX],Map[ZombieSpawnY],Map[ZombieSpawnZ]))
  1953. {
  1954. GameTextForPlayer(playerid,"~r~Cannot explode near Zombie spawn!",4000,5);
  1955. }
  1956. else
  1957. {
  1958. new Float:x,Float:y,Float:z;
  1959. GetPlayerPos(playerid,Float:x,Float:y,Float:z);
  1960. SetPlayerHealth(playerid,0.0);
  1961. CreateExplosion(Float:x,Float:y,Float:z,0,6.0);
  1962. foreach(Player,i)
  1963. {
  1964. GetClosestPlayer(i);
  1965. if(IsPlayerConnected(i))
  1966. {
  1967. switch(GetPlayerSkin(i))
  1968. {
  1969. case NON_IMMUNE:
  1970. {
  1971. if(IsPlayerInRangeOfPoint(i,7.0,Float:x,Float:y,Float:z))
  1972. {
  1973. if(pInfo[i][IsPlayerInfected] == 0)
  1974. {
  1975. InfectPlayerStandard(i);
  1976. }
  1977. }
  1978. }
  1979. }
  1980. }
  1981. }
  1982. }
  1983. }
  1984. }
  1985. }
  1986. return 1;
  1987. }
  1988.  
  1989. public OnVehicleMod(playerid, vehicleid, componentid)
  1990. {
  1991. new Admin[24] = "Anti-cheat";
  1992. new reason3[128] = "Vehicle Modding";
  1993. BanPlayer(playerid,reason3,Admin);
  1994. return 0;
  1995. }
  1996.  
  1997. public OnPlayerUpdate(playerid)
  1998. {
  1999. new Float:hp;
  2000. GetPlayerHealth(playerid,hp);
  2001. if(hp <= 1.0) return SetPlayerHealth(playerid,-1.0);
  2002.  
  2003. if(Map[AllowWater] == 0)
  2004. {
  2005. if(IsPlayerInWater(playerid))
  2006. {
  2007. SetPlayerHealth(playerid,0.0);
  2008. }
  2009. }
  2010. return 1;
  2011. }
  2012.  
  2013. public OnPlayerCommandPerformed(playerid, cmdtext[], success)
  2014. {
  2015. if(!success)
  2016. {
  2017. PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
  2018. SendClientMessage(playerid,-1,""chat" Incorrect command try /help or /cmds");
  2019. }
  2020. return 1;
  2021. }
  2022.  
  2023. CMD:skip(playerid)
  2024. {
  2025. if(pInfo[playerid][pAdminLevel] >= 5)
  2026. {
  2027. time = 5;
  2028. }
  2029. return 1;
  2030. }
  2031.  
  2032. // ****************** COMMANDS ********************** //
  2033. CMD:rankobjects(playerid) return RemovePlayerAttachedObject(playerid,1);
  2034.  
  2035. CMD:dance1(playerid)
  2036. {
  2037. if(team[playerid] == TEAM_ZOMBIE)
  2038. {
  2039. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
  2040. }
  2041. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You must be a zombie to use this command!");
  2042. return 1;
  2043. }
  2044.  
  2045. CMD:dance2(playerid)
  2046. {
  2047. if(team[playerid] == TEAM_ZOMBIE)
  2048. {
  2049. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
  2050. }
  2051. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You must be a zombie to use this command!");
  2052. return 1;
  2053. }
  2054.  
  2055. CMD:dance3(playerid)
  2056. {
  2057. if(team[playerid] == TEAM_ZOMBIE)
  2058. {
  2059. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
  2060. }
  2061. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You must be a zombie to use this command!");
  2062. return 1;
  2063. }
  2064.  
  2065. CMD:dance4(playerid)
  2066. {
  2067. if(team[playerid] == TEAM_ZOMBIE)
  2068. {
  2069. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
  2070. }
  2071. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You must be a zombie to use this command!");
  2072. return 1;
  2073. }
  2074.  
  2075. CMD:stopanim(playerid) return ClearAnimations(playerid);
  2076.  
  2077. CMD:vipmenu(playerid)
  2078. {
  2079. if(pInfo[playerid][pVipLevel] >= 1)
  2080. {
  2081. new str[300];
  2082. strcat(str,"Vip Unlimited Ammo (LVL1+)\nVip Weapons (LVL1+)\nVip Classes (LVL3+)\nEnable Kick Back (LVL3+)\nDisable Kick Back (LVL3+)\n\
  2083. Vip S.W.A.T Armour Object (LVL2+)\nVip Name Flash (LVL 4+)\nDisable Vip Name Flash (LVL 4+)\nVip Armour (LVL 4+)");
  2084. ShowPlayerDialog(playerid,DIALOG_VIP,DIALOG_STYLE_LIST,"Vip Dialog",str,"Select","Close");
  2085. }
  2086. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You need atleast vip package one to use this command!");
  2087. return 1;
  2088. }
  2089.  
  2090. CMD:ranks(playerid)
  2091. {
  2092. new str[800];
  2093. strcat(str,"10 Kills - Rank 1\n50 Kills - Rank 2\n100 Kills - Rank 3\n150 Kills - Rank 4\n200 Kills - Rank 5\n250 Kills - Rank 6\n300 Kills - Rank 7\n\
  2094. 350 Kills - Rank 8\n400 Kills - Rank 9\n450 Kills - Rank 10\n500 Kills - Rank 11\n550 Kills - Rank 12\n600 Kills - Rank 13\n650 Kills - Rank 14\n\
  2095. 700 Kills - Rank 15\n750 Kills - Rank 16\n800 Kills - Rank 17\n850 Kills - Rank 18\n900 Kills - Rank 19\n950 Kills - Rank 20\n");
  2096.  
  2097. strcat(str,"1000 Kills - Rank 21\n1500 Kills - Rank 22\n2000 Kills - Rank 23\n2500 Kills - Rank 24\n3000 Kills - Rank 25\n3500 Kills - Rank 26\n\
  2098. 4000 Kills - Rank 27\n4500 Kills - Rank 28\n5000 Kills - Rank 29\n5500 Kills - Rank 30\n6000 Kills - Rank 31\n6500 Kills - Rank 32");
  2099. ShowPlayerDialog(playerid,5326,DIALOG_STYLE_MSGBOX,"Rank list",str,"Close","");
  2100. return 1;
  2101. }
  2102.  
  2103. CMD:vip(playerid)
  2104. {
  2105. new vipinfo[600];
  2106. strcat(vipinfo,""chat" Hello when you donate depends on how much you donated\nYou get what it's called an 'Vip Package it sets your current package\nWith bunch of awesome features\n\
  2107. Package info are posted below:\nVisit www.zombie-mod.com/vip.html !");
  2108. ShowPlayerDialog(playerid,DIALOG_VIPINFO,DIALOG_STYLE_MSGBOX,"Vip Info",vipinfo,"Close","");
  2109. return 1;
  2110. }
  2111.  
  2112. CMD:rules(playerid)
  2113. {
  2114. new rules[600];
  2115. strcat(rules,"1.No third party mod (NO HACKING!)\n2.No Cleo mods\n3.No Boxes in invalid position\n4.Do not go outside of the map area\5.No Advertising\n\
  2116. 6.Do not spam or flood the public chat\n7.No insulting anyone on the server\n8.No bunnyhopping!\n9.No Pausing during IG\n10.No Racism TOLERATED\n11.No c-bugging weapon-scroll or any other GTA bugs\n12.No Spawn Killing (SK)");
  2117. ShowPlayerDialog(playerid,DIALOG_RULES,DIALOG_STYLE_MSGBOX,"Server Public Rules",rules,"Close","");
  2118. return 1;
  2119. }
  2120.  
  2121. CMD:help(playerid)
  2122. {
  2123. new helpstring[300];
  2124. strcat(helpstring,"Welcome to ZombieMod: Apocalypse this is a remake of The orginial Zombie Apocalypse re-scripted by 'ProdigyChicken'\nUseful Commands: /help,/cmds,/rules,/class,/radio,/cure");
  2125. ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"You asked for help?",helpstring,"Close","");
  2126. return 1;
  2127. }
  2128.  
  2129. CMD:cmds(playerid)
  2130. {
  2131. new cmdstring[500];
  2132. strcat(cmdstring,"rankobjects - Turn off rank objects\nsharexp - Give your buddies some xp\ntop10kills - Top 10 killers!\nranks - Rank list for the server\nvip - Check our Donation features!\nPress The key 'Y' to shout\ndance1 - Dance animation\ndance2 - Dance animation\ndance3 - Dance animation\ndance4 - Dance animation\nrules - List of server rules\n\
  2133. help - Obvious\ncure - Cure an infected player\nheal - Heal a human\n");
  2134. strcat(cmdstring,"kill - Kill yourself\nmyteam - Check your team\ntop10-30 - Show top players of the server\n\
  2135. radio - Play list of radio genres\npm - Personal Message\nblockpm - Block people to PM you\nunblockpm - Obvious\nss - Save stats\nstats - Check your stats\n");
  2136. ShowPlayerDialog(playerid,DIALOG_CMDS,DIALOG_STYLE_MSGBOX,"Server Commands!",cmdstring,"Close","");
  2137. return 1;
  2138. }
  2139.  
  2140. CMD:acmds(playerid)
  2141. {
  2142. if(pInfo[playerid][pAdminLevel] >= 1)
  2143. {
  2144. new acmdstring[300];
  2145. strcat(acmdstring,"Trial Admin: /codes, /getid, /clearchat, /wslap, /a, /warn, /akill,/mute,/ummute,/kick\n\
  2146. Moderator: /xp, /ban, /unban, /slap, /settime, /setweather, /get\nAdmin: /givecoins, /ann2, /ip, /setzombie, /sethuman\nManagement: /givexp,/ann, /changename\nLevel 5 & 6 are protected");
  2147. ShowPlayerDialog(playerid,DIALOG_ACMDS,DIALOG_STYLE_MSGBOX,"Admin Commands",acmdstring,"Close","");
  2148. }
  2149. return 1;
  2150. }
  2151.  
  2152. CMD:codes(playerid)
  2153. {
  2154. if(pInfo[playerid][pAdminLevel] >= 1)
  2155. {
  2156. new cstring[600];
  2157. strcat(cstring,"HH - Health Hacks (Permanent)\nGM -God Mode (Permanent)\nAB - Air Break (Permanent)\nSH- Speed Hacks (Permanent)\nWH - Weapon Hacks (Permanent)\n\
  2158. SK - Spawnkill (Over did)\nFH - Fly hacks (Permanent)\nOH - Other hacks (Permanent)\nVH - Vehicle hacks (Permanent)\nPF - Profanity");
  2159. ShowPlayerDialog(playerid,9511,DIALOG_STYLE_MSGBOX,"Ban Codes",cstring,"Close","");
  2160. }
  2161. return 1;
  2162. }
  2163.  
  2164. CMD:cure(playerid,params[])
  2165. {
  2166. if(team[playerid] == TEAM_HUMAN)
  2167. {
  2168. if(pInfo[playerid][pHumanClass] == MEDIC || pInfo[playerid][pHumanClass] == ADVANCEDMEDIC || pInfo[playerid][pHumanClass] == HEAVYMEDIC || pInfo[playerid][pHumanClass] == VIPMEDIC || pInfo[playerid][pHumanClass] == DOCTOR)
  2169. {
  2170. new targetid,string[128],str[256];
  2171. if(sscanf(params,"u", targetid)) return SendClientMessage(playerid,-1,""chat" /cure [playerid]");
  2172.  
  2173. if(pInfo[targetid][IsPlayerInfected] == 1)
  2174. {
  2175. CurePlayer(targetid);
  2176. format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s has cured you",GetClassName(playerid),PlayerName(playerid));
  2177. GameTextForPlayer(targetid,string,3500,5);
  2178. format(str,sizeof(str),""chat""COL_LGREEN" %s %s has cured %s",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid));
  2179. SendClientMessageToAll(-1,str);
  2180. GivePlayerXP(playerid,20);
  2181. }
  2182. else return SendClientMessage(playerid,-1,""chat" The player you are trying to cure isn't infected");
  2183. }
  2184. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be an Medic & Advanced Medic or V.I.P Medic to use this command!");
  2185. }
  2186. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be an human to use this command!");
  2187. return 1;
  2188. }
  2189.  
  2190. CMD:heal(playerid,params[])
  2191. {
  2192. if(gettime() - 15 < Abilitys[playerid][HealCoolDown]) return GameTextForPlayer(playerid,"~w~ Cannot heal wait 15 seconds!",1000,5);
  2193. {
  2194. if(team[playerid] == TEAM_HUMAN)
  2195. {
  2196. if(pInfo[playerid][pHumanClass] == HEAVYMEDIC || pInfo[playerid][pHumanClass] == ADVANCEDMEDIC || pInfo[playerid][pHumanClass] == VIPMEDIC || pInfo[playerid][pHumanClass] == DOCTOR)
  2197. {
  2198. new targetid,string[128],str[256];
  2199. if(sscanf(params,"u", targetid)) return SendClientMessage(playerid,-1,""chat" /heal [playerid]");
  2200. new Float:hp;
  2201. GetPlayerHealth(targetid,hp);
  2202. if(team[targetid] == TEAM_HUMAN)
  2203. {
  2204. if(hp >= 80)
  2205. {
  2206. SendClientMessage(playerid,-1,""chat" That player already has enough health to survive");
  2207. }
  2208. else
  2209. {
  2210. if(pInfo[playerid][pHumanClass] == HEAVYMEDIC || pInfo[playerid][pHumanClass] == ADVANCEDMEDIC)
  2211. {
  2212. SetPlayerHealth(targetid,hp+5);
  2213. format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s has healed you (New HP: %.2f)",GetClassName(playerid),PlayerName(playerid),hp);
  2214. GameTextForPlayer(targetid,string,3500,5);
  2215. format(str,sizeof(str),""chat""COL_LGREEN" %s %s has healed %s (NEW HP: %.2f HP)",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid),hp,PlayerName(targetid));
  2216. SendClientMessageToAll(-1,str);
  2217. GivePlayerXP(playerid,20);
  2218. Abilitys[playerid][HealCoolDown] = gettime();
  2219. }
  2220. else if(pInfo[playerid][pHumanClass] == VIPMEDIC)
  2221. {
  2222. SetPlayerHealth(targetid,hp+20);
  2223. format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s has healed you (by %.2f HP)",GetClassName(playerid),PlayerName(playerid),hp);
  2224. GameTextForPlayer(targetid,string,3500,5);
  2225. format(str,sizeof(str),""chat""COL_LGREEN" %s %s has healed %s by (NEW HP: %.2f HP)",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid),hp);
  2226. SendClientMessageToAll(-1,str);
  2227. GivePlayerXP(playerid,20);
  2228. Abilitys[playerid][HealCoolDown] = gettime();
  2229. }
  2230.  
  2231. else if(pInfo[playerid][pHumanClass] == DOCTOR)
  2232. {
  2233. SetPlayerHealth(targetid,hp+40);
  2234. format(string,sizeof(string),"~n~~n~~n~~n~~g~%s~w~ %s has healed you (by %.2f HP)",GetClassName(playerid),PlayerName(playerid),hp);
  2235. GameTextForPlayer(targetid,string,3500,5);
  2236. format(str,sizeof(str),""chat""COL_LGREEN" %s %s has healed %s by (NEW HP: %.2f HP)",GetClassName(playerid),PlayerName(playerid),PlayerName(targetid),hp);
  2237. SendClientMessageToAll(-1,str);
  2238. GivePlayerXP(playerid,35);
  2239. Abilitys[playerid][HealCoolDown] = gettime();
  2240. }
  2241. }
  2242. }
  2243. else return SendClientMessage(playerid,-1,""chat" You cannot heal an zombie!");
  2244. }
  2245. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be an Medic & Advanced Medic & Doctor or V.I.P Medic to use this command!");
  2246. }
  2247. else return SendClientMessage(playerid,-1,""chat""COL_LGREEN" You'll need to be an human to use this command!");
  2248. }
  2249. return 1;
  2250. }
  2251.  
  2252. CMD:kill(playerid)
  2253. {
  2254. if(team[playerid] == TEAM_HUMAN)
  2255. {
  2256. SetPlayerHealth(playerid,0.0);
  2257. SendClientMessage(playerid,-1,""chat" You've killed yourself");
  2258. }
  2259. else return SendClientMessage(playerid,-1,""chat" You cannot kill yourself if you are an 'Zombie'");
  2260. return 1;
  2261. }
  2262.  
  2263. CMD:admins(playerid, params[])
  2264. {
  2265. if(pInfo[playerid][pHour] >= 4)
  2266. {
  2267. new adminstring[128];
  2268. if(IsPlayerConnected(playerid))
  2269. {
  2270. for (new i = 0; i < MAX_PLAYERS; i++)
  2271. {
  2272. if(IsPlayerConnected(i))
  2273. {
  2274. if(pInfo[i][pAdminLevel] > 0)
  2275. {
  2276. format(adminstring, sizeof(adminstring),"%s%s: %s\n", adminstring, GetAdminName(i), PlayerName(i));
  2277. }
  2278. }
  2279. }
  2280. ShowPlayerDialog(playerid,DIALOG_ADMINS,DIALOG_STYLE_MSGBOX,"Online admins",adminstring,"Close","");
  2281. }
  2282. else return SendClientMessage(playerid,-1,""chat" No admins online");
  2283. }
  2284. else return SendClientMessage(playerid,-1,""chat" You cannot view admins online (You need 4 hours IG time)");
  2285. return 1;
  2286. }
  2287.  
  2288. CMD:vips(playerid, params[])
  2289. {
  2290. if(pInfo[playerid][pHour] >= 1)
  2291. {
  2292. new adminstring[128];
  2293. if(IsPlayerConnected(playerid))
  2294. {
  2295. for (new i = 0; i < MAX_PLAYERS; i++)
  2296. {
  2297. if(IsPlayerConnected(i))
  2298. {
  2299. if(pInfo[i][pVipLevel] > 0)
  2300. {
  2301. format(adminstring, sizeof(adminstring),"%sLevel %d: %s\n", adminstring, pInfo[i][pVipLevel], PlayerName(i));
  2302. }
  2303. }
  2304. }
  2305. ShowPlayerDialog(playerid,DIALOG_VIPS,DIALOG_STYLE_MSGBOX,"Online V.I.Ps",adminstring,"Close","");
  2306. }
  2307. else return SendClientMessage(playerid,-1,""chat" No vip's online");
  2308. }
  2309. else return SendClientMessage(playerid,-1,""chat" You cannot view vips online (You need 1 Hour IG time)");
  2310. return 1;
  2311. }
  2312.  
  2313. CMD:myteam(playerid)
  2314. {
  2315. new strteam[128];
  2316. switch(team[playerid])
  2317. {
  2318. case TEAM_ZOMBIE: strteam = "Zombie";
  2319. case TEAM_HUMAN: strteam = "Human";
  2320. }
  2321.  
  2322. new str[128];
  2323. format(str,sizeof(str),""chat" Your current team is %s",strteam);
  2324. SendClientMessage(playerid,-1,str);
  2325. return 1;
  2326. }
  2327.  
  2328. CMD:class(playerid,params[])
  2329. {
  2330. if(team[playerid] == TEAM_HUMAN)
  2331. {
  2332. if(time >= 200)
  2333. {
  2334. ShowPlayerDialog(playerid,DIALOG_CLASS,DIALOG_STYLE_LIST,"Class Selection","Human Classes\nZombie Classes\nHalloween Event Classes!","Select","Close");
  2335. }
  2336. else return SendClientMessage(playerid,-1,""chat" 50 seconds has passed! you cannot select a class anymore!");
  2337. }
  2338. else return ShowPlayerDialog(playerid,DIALOG_CLASS,DIALOG_STYLE_LIST,"Class Selection","Human Classes\nZombie Classes\n","Select","Close");
  2339. return 1;
  2340. }
  2341.  
  2342. CMD:top10kills(playerid, params[])
  2343. {
  2344. mysql_query("SELECT `Username`, `pKills` FROM `users` ORDER BY `pKills` DESC LIMIT 10");
  2345. mysql_store_result();
  2346.  
  2347. new
  2348. ID,
  2349. output[800];
  2350.  
  2351. while(mysql_retrieve_row())
  2352. {
  2353. ID ++;
  2354.  
  2355. new
  2356. username[24],
  2357. scorevariable[80];
  2358.  
  2359. mysql_fetch_field_row(username, "Username");
  2360. mysql_fetch_field_row(scorevariable, "pKills");
  2361.  
  2362. format(output, sizeof(output), "%s%d. %s %d Kills\n", output, ID, username, strval(scorevariable));
  2363. }
  2364. mysql_free_result();
  2365.  
  2366. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 10 Killers", output, "OK", "");
  2367. return 1;
  2368. }
  2369.  
  2370. CMD:top20kills(playerid, params[])
  2371. {
  2372. mysql_query("SELECT `Username`, `pKills` FROM `users` ORDER BY `pKills` DESC LIMIT 20");
  2373. mysql_store_result();
  2374.  
  2375. new
  2376. ID,
  2377. output[800];
  2378.  
  2379. while(mysql_retrieve_row())
  2380. {
  2381. ID ++;
  2382.  
  2383. new
  2384. username[24],
  2385. scorevariable[80];
  2386.  
  2387. mysql_fetch_field_row(username, "Username");
  2388. mysql_fetch_field_row(scorevariable, "pKills");
  2389.  
  2390. format(output, sizeof(output), "%s%d. %s %d Kills\n", output, ID, username, strval(scorevariable));
  2391. }
  2392. mysql_free_result();
  2393.  
  2394. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 20 Killers", output, "OK", "");
  2395. return 1;
  2396. }
  2397.  
  2398. CMD:top30kills(playerid, params[])
  2399. {
  2400. mysql_query("SELECT `Username`, `pKills` FROM `users` ORDER BY `pKills` DESC LIMIT 30");
  2401. mysql_store_result();
  2402.  
  2403. new
  2404. ID,
  2405. output[800];
  2406.  
  2407. while(mysql_retrieve_row())
  2408. {
  2409. ID ++;
  2410.  
  2411. new
  2412. username[24],
  2413. scorevariable[80];
  2414.  
  2415. mysql_fetch_field_row(username, "Username");
  2416. mysql_fetch_field_row(scorevariable, "pKills");
  2417.  
  2418. format(output, sizeof(output), "%s%d. %s %d Kills\n", output, ID, username, strval(scorevariable));
  2419. }
  2420. mysql_free_result();
  2421.  
  2422. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 30 Killers", output, "OK", "");
  2423. return 1;
  2424. }
  2425.  
  2426.  
  2427. CMD:top10(playerid, params[])
  2428. {
  2429. mysql_query("SELECT `Username`, `pXP` FROM `users` ORDER BY `pXP` DESC LIMIT 10");
  2430. mysql_store_result();
  2431.  
  2432. new
  2433. ID,
  2434. output[800];
  2435.  
  2436. while(mysql_retrieve_row())
  2437. {
  2438. ID ++;
  2439.  
  2440. new
  2441. username[24],
  2442. scorevariable[80];
  2443.  
  2444. mysql_fetch_field_row(username, "Username");
  2445. mysql_fetch_field_row(scorevariable, "pXP");
  2446.  
  2447. format(output, sizeof(output), "%s%d. %s %d XP\n", output, ID, username, strval(scorevariable));
  2448. }
  2449. mysql_free_result();
  2450.  
  2451. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 10 Players", output, "OK", "");
  2452. return 1;
  2453. }
  2454.  
  2455. CMD:top20(playerid, params[])
  2456. {
  2457. mysql_query("SELECT `Username`, `pXP` FROM `users` ORDER BY `pXP` DESC LIMIT 20");
  2458. mysql_store_result();
  2459.  
  2460. new
  2461. ID,
  2462. output[800];
  2463.  
  2464. while(mysql_retrieve_row())
  2465. {
  2466. ID ++;
  2467.  
  2468. new
  2469. username[24],
  2470. scorevariable[80];
  2471.  
  2472. mysql_fetch_field_row(username, "Username");
  2473. mysql_fetch_field_row(scorevariable, "pXP");
  2474.  
  2475. format(output, sizeof(output), "%s%d. %s %d XP\n", output, ID, username, strval(scorevariable));
  2476. }
  2477. mysql_free_result();
  2478.  
  2479. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 20 Players", output, "OK", "");
  2480. return 1;
  2481. }
  2482.  
  2483. CMD:top30(playerid, params[])
  2484. {
  2485. mysql_query("SELECT `Username`, `pXP` FROM `users` ORDER BY `pXP` DESC LIMIT 30");
  2486. mysql_store_result();
  2487.  
  2488. new
  2489. ID,
  2490. output[900];
  2491.  
  2492. while(mysql_retrieve_row())
  2493. {
  2494. ID ++;
  2495.  
  2496. new
  2497. username[24],
  2498. scorevariable[100];
  2499.  
  2500. mysql_fetch_field_row(username, "Username");
  2501. mysql_fetch_field_row(scorevariable, "pXP");
  2502.  
  2503. format(output, sizeof(output), "%s%d. %s %d XP\n", output, ID, username, strval(scorevariable));
  2504. }
  2505. mysql_free_result();
  2506.  
  2507. ShowPlayerDialog(playerid, DIALOG_TOP, DIALOG_STYLE_MSGBOX, "Top 30 Players", output, "OK", "");
  2508. return 1;
  2509. }
  2510.  
  2511. CMD:nextmap(playerid,params[])
  2512. {
  2513. if(pInfo[playerid][pLogged] == 1)
  2514. {
  2515. if(pInfo[playerid][pAdminLevel] >= 6)
  2516. {
  2517. new map,stringmap[256];
  2518. if(sscanf(params,"i", map)) return SendClientMessage(playerid,-1,""chat" /nextmap [mapid]");
  2519.  
  2520. format(stringmap,sizeof(stringmap),""chat""COL_LIGHTBLUE" %s %s set next map id to %i",GetAdminName(playerid),PlayerName(playerid),map);
  2521. SendClientMessageToAll(-1,stringmap);
  2522. mapid = map;
  2523. }
  2524. }
  2525. return 1;
  2526. }
  2527.  
  2528. CMD:setzombie(playerid,params[])
  2529. {
  2530. if(pInfo[playerid][pAdminLevel] >= 3)
  2531. {
  2532. if(IsPlayerConnected(playerid))
  2533. {
  2534. new targetid,str[256];
  2535. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /setzombie [playerid]");
  2536. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2537.  
  2538. ZombieSetup(targetid);
  2539. SpawnPlayer(targetid);
  2540. format(str,sizeof(str),""chat""COL_LGREEN" Admin %s(%i) has set your team to Zombie",PlayerName(playerid),playerid);
  2541. SendClientMessage(targetid,-1,str);
  2542. format(str,sizeof(str),""chat""COL_LGREEN" You've changed %s(%i) team to zombie!",PlayerName(targetid),targetid);
  2543. SendClientMessage(playerid,-1,str);
  2544. }
  2545. }
  2546. return 1;
  2547. }
  2548.  
  2549. CMD:sethuman(playerid,params[])
  2550. {
  2551. if(pInfo[playerid][pAdminLevel] >= 3)
  2552. {
  2553. if(IsPlayerConnected(playerid))
  2554. {
  2555. new targetid,str[256];
  2556. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /sethuman [playerid]");
  2557. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2558.  
  2559. HumanSetup(targetid);
  2560. SpawnPlayer(targetid);
  2561. format(str,sizeof(str),""chat""COL_LGREEN" Admin %s(%i) has set your team to Human",PlayerName(playerid),playerid);
  2562. SendClientMessage(targetid,-1,str);
  2563. format(str,sizeof(str),""chat""COL_LGREEN" You've changed %s(%i) team to Human!",PlayerName(targetid),targetid);
  2564. SendClientMessage(playerid,-1,str);
  2565. }
  2566. }
  2567. return 1;
  2568. }
  2569.  
  2570. CMD:ban(playerid,params[])
  2571. {
  2572. if(pInfo[playerid][pAdminLevel] >= 2)
  2573. {
  2574. if(IsPlayerConnected(playerid))
  2575. {
  2576. new targetid,reason[105],string[256];
  2577. if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" /ban [playerid] [reason]");
  2578. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2579.  
  2580. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has banned %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
  2581. SendClientMessageToAll(-1,string);
  2582.  
  2583. BanPlayer(targetid,reason,PlayerName(playerid));
  2584. }
  2585. }
  2586. else {
  2587. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2588. }
  2589. return 1;
  2590. }
  2591.  
  2592. CMD:unban(playerid, params[])
  2593. {
  2594. if(pInfo[playerid][pLogged] == 1)
  2595. {
  2596. if(pInfo[playerid][pAdminLevel] >= 2)
  2597. {
  2598. new Query[200];
  2599. if (!strlen(params)) return SendClientMessage(playerid,-1,""chat" /unban [name]");
  2600. format(Query, sizeof(Query), "SELECT `Name` FROM `banlog` WHERE Name = '%s' AND pAccountLock = 1 LIMIT 1", escstring(params));
  2601. mysql_query(Query);
  2602. mysql_store_result();
  2603. if(!mysql_num_rows())
  2604. {
  2605. new string[200];
  2606. format(string, sizeof(string), ""chat" Nobody under the name of %s is banned!", params);
  2607. mysql_free_result();
  2608. return SendClientMessage(playerid,-1,string);
  2609. }
  2610. else if(mysql_num_rows() != 0)
  2611. {
  2612. format(Query, sizeof(Query), "UPDATE `banlog` SET `pAccountLock` = 0 WHERE Name = '%s'", escstring(params));
  2613. mysql_query(Query);
  2614. mysql_store_result();
  2615. new string[200];
  2616. format(string, sizeof(string), ""chat" %s has been unbanned!", params);
  2617. SendClientMessage(playerid, 0x66FF33, string);
  2618. }
  2619. }
  2620. }
  2621. return 1;
  2622. }
  2623.  
  2624. /*
  2625. CMD:unban(playerid, params[])
  2626. {
  2627. if(pInfo[playerid][pAdminLevel] >= 2)
  2628. {
  2629. if(IsPlayerConnected(playerid))
  2630. {
  2631. new name[24], query[128], string[128];
  2632. if(sscanf(params, "s[24]", name)) return SendClientMessage(playerid, -1, ""chat" /unban [player name] CASE SENSITIVE!");
  2633.  
  2634. format(query, sizeof(query), "SELECT * FROM users WHERE Username = '%s'", name);
  2635. mysql_query(query);
  2636. mysql_store_result();
  2637.  
  2638. new row = mysql_num_rows();
  2639. if(row == 1)
  2640. {
  2641. format(string, sizeof(string), "UPDATE banlog SET pBannedReason ='none',pBannedBy='none',pIPBanned='unbanned',pAccountLock='0',pIPBanned='0' WHERE Username='%s'", name);
  2642. mysql_query(string);
  2643.  
  2644. format(string, sizeof(string), ""chat" You have unbanned account %s", name);
  2645. SendClientMessage(playerid, -1, string);
  2646. }
  2647. else SendClientMessage(playerid, -1, ""chat" Username is invalid!");
  2648. mysql_free_result();
  2649. }
  2650. }
  2651. else {
  2652. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2653. }
  2654. return 1;
  2655. }
  2656. */
  2657.  
  2658. CMD:radio(playerid)
  2659. {
  2660. new string[256];
  2661. strcat(string,"Dance Pop\nJPop\nKPop\nHeavy Rock\nHip Hop\nHip Hop 2\nHip Hop 3\nPop\nRock\nRock 2\nTechno\nStop Radio!");
  2662. ShowPlayerDialog(playerid,DIALOG_RADIO,DIALOG_STYLE_LIST,"Select an radio!",string,"Select","Close");
  2663. return 1;
  2664. }
  2665.  
  2666. CMD:getid(playerid,params[])
  2667. {
  2668. new found, string[128], playername[MAX_PLAYER_NAME];
  2669. if(pInfo[playerid][pAdminLevel] >= 1)
  2670. {
  2671. if(isnull(params)) return SendClientMessage(playerid, -1, ""chat" /getid [PartOfName] ");
  2672. format(string,sizeof(string),""chat" Searched for: \"%s\"",params);
  2673. SendClientMessage(playerid, -1,string);
  2674. for(new i=0; i <= MAX_PLAYERS; i++)
  2675. {
  2676. if(IsPlayerConnected(i))
  2677. {
  2678. GetPlayerName(i, playername, MAX_PLAYER_NAME);
  2679. new namelen = strlen(playername);
  2680. new bool:searched=false;
  2681. for(new pos=0; pos <= namelen; pos++)
  2682. {
  2683. if(searched != true)
  2684. {
  2685. if(strfind(playername,params,true) == pos)
  2686. {
  2687. found++;
  2688. format(string,sizeof(string),""chat" %d. %s (ID: %d)",found,playername,i);
  2689. SendClientMessage(playerid, -1 ,string);
  2690. searched = true;
  2691. }
  2692. }
  2693. }
  2694. }
  2695. }
  2696. if(found == 0)
  2697. SendClientMessage(playerid, -1, ""chat" No Players Localized!");
  2698. }
  2699. else {
  2700. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2701. }
  2702. return 1;
  2703. }
  2704.  
  2705. CMD:clearchat(playerid,params[])
  2706. {
  2707. if(pInfo[playerid][pAdminLevel] >= 1)
  2708. {
  2709. new reason[105], string[256];
  2710. if(sscanf(params, "s[105]", reason)) return SendClientMessage(playerid,-1,""chat" /cc [reason]");
  2711.  
  2712. ClearChat();
  2713. format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s %s cleared the chat [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),reason);
  2714. SendClientMessageToAll(-1,string);
  2715. }
  2716. else {
  2717. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2718. }
  2719. return 1;
  2720. }
  2721.  
  2722. CMD:setlevel(playerid,params[])
  2723. {
  2724. if(pInfo[playerid][pAdminLevel] >= 6)
  2725. {
  2726. new targetid,level,string[256];
  2727. if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid,-1,""chat" /setlevel [playerid] [level]");
  2728. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2729. if(level < 0 || level > 7) return SendClientMessage(playerid,-1,""chat" Admin levels are ONLY between 1-7");
  2730.  
  2731. pInfo[targetid][pAdminLevel] = level;
  2732.  
  2733. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given admin status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
  2734. SendClientMessageToAll(-1,string);
  2735. }
  2736. else {
  2737. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2738. }
  2739. return 1;
  2740. }
  2741.  
  2742. CMD:setvip(playerid,params[])
  2743. {
  2744. if(pInfo[playerid][pAdminLevel] >= 6)
  2745. {
  2746. new targetid,level,string[256];
  2747. if(sscanf(params, "ud", targetid, level)) return SendClientMessage(playerid,-1,""chat" /setvip [playerid] [level]");
  2748. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2749. if(level < 0 || level > 4) return SendClientMessage(playerid,-1,""chat" Vip levels are ONLY between 1-4");
  2750.  
  2751. pInfo[targetid][pVipLevel] = level;
  2752.  
  2753. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s have given vip status of %d to %s",GetAdminName(playerid),PlayerName(playerid),level,PlayerName(targetid));
  2754. SendClientMessageToAll(-1,string);
  2755. }
  2756. else {
  2757. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2758. }
  2759. return 1;
  2760. }
  2761.  
  2762. CMD:slap(playerid,params[])
  2763. {
  2764. if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid))
  2765. {
  2766. new targetid,string[256];
  2767. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /slap [playerid]");
  2768. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2769.  
  2770. new Float:posxx[3];
  2771. GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]);
  2772. SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+40);
  2773.  
  2774. if(IsPlayerAdmin(playerid))
  2775. {
  2776. format(string, sizeof(string), ""chat" RCON Admin has slapped %s",PlayerName(targetid));
  2777. SendClientMessageToAll(-1,string);
  2778. }
  2779. else
  2780. {
  2781. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has slapped %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
  2782. SendClientMessageToAll(-1,string);
  2783. }
  2784. }
  2785. else {
  2786. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2787. }
  2788. return 1;
  2789. }
  2790.  
  2791. CMD:wslap(playerid,params[])
  2792. {
  2793. if(pInfo[playerid][pAdminLevel] >= 1)
  2794. {
  2795. new targetid,string[256];
  2796. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /wslap [playerid]");
  2797. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2798.  
  2799. new Float:posxx[3];
  2800.  
  2801. GetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]);
  2802. SetPlayerPos(targetid, posxx[0], posxx[1], posxx[2]+4);
  2803.  
  2804. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has warned slapped %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
  2805. SendClientMessageToAll(-1,string);
  2806. }
  2807. else {
  2808. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2809. }
  2810. return 1;
  2811. }
  2812.  
  2813. CMD:a(playerid,params[])
  2814. {
  2815. new adminstring[256];
  2816. if(pInfo[playerid][pAdminLevel] >= 1)
  2817. {
  2818. if(!strlen(params))
  2819. {
  2820. SendClientMessage(playerid, -1, ""chat" /a [message]");
  2821. return 1;
  2822. }
  2823. format(adminstring, sizeof(adminstring), ""COL_LIGHTBLUE"[Admin Chat] %s %s[%d]: %s",GetAdminName(playerid),PlayerName(playerid), playerid, params);
  2824. SendMessageToAllAdmins(adminstring, -1);
  2825. }
  2826. else {
  2827. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2828. }
  2829. return 1;
  2830. }
  2831.  
  2832. CMD:z(playerid,params[])
  2833. {
  2834. new zstring[256];
  2835. if(team[playerid] == TEAM_ZOMBIE)
  2836. {
  2837. if(!strlen(params))
  2838. {
  2839. SendClientMessage(playerid, -1, ""chat" /z [message]");
  2840. return 1;
  2841. }
  2842. format(zstring, sizeof(zstring), ""chat""COL_RED"[Zombie Chat]"COL_WHITE" %s[%d]: %s", PlayerName(playerid), playerid, params);
  2843. SendZMessage(zstring, -1);
  2844. }
  2845. else return SendClientMessage(playerid,-1,""chat" You must be a zombie to use this chat function");
  2846. return 1;
  2847. }
  2848.  
  2849. CMD:h(playerid,params[])
  2850. {
  2851. new zstring[256];
  2852. if(team[playerid] == TEAM_HUMAN)
  2853. {
  2854. if(!strlen(params))
  2855. {
  2856. SendClientMessage(playerid, -1, ""chat" /h [message]");
  2857. return 1;
  2858. }
  2859. format(zstring, sizeof(zstring), ""chat""COL_RED"[Human Chat]"COL_WHITE" %s[%d]: %s", PlayerName(playerid), playerid, params);
  2860. SendHMessage(zstring, -1);
  2861. }
  2862. else return SendClientMessage(playerid,-1,""chat" You must be a human to use this chat function");
  2863. return 1;
  2864. }
  2865.  
  2866. CMD:report(playerid,params[])
  2867. {
  2868. new string[256];
  2869. strcat(string,"Racism\nOffensive Language\nAirbraking - Hacks\nHealth Hacks\nArmour Hacks\nWeapon Hacks\nSpawn Killing\nBug Abusing");
  2870. ShowPlayerDialog(playerid,DIALOG_REPORT,DIALOG_STYLE_LIST,"Select an valid reason!",string,"Select","Cancel");
  2871. return 1;
  2872. }
  2873.  
  2874. CMD:pm(playerid,params[])
  2875. {
  2876. new targetid,message[256],pmstring[256],string[128];
  2877.  
  2878. if(sscanf(params,"us[256]", targetid, message)) return SendClientMessage(playerid,-1,""chat" /pm [playerid] [message]");
  2879. if(pInfo[playerid][pLogged] == 1)
  2880. {
  2881. if(pInfo[targetid][pPM] == 0)
  2882. {
  2883. format(pmstring,sizeof(pmstring),""chat""COL_RED" PM From %s[%d] Message: %s",PlayerName(playerid),playerid,message);
  2884. SendClientMessage(targetid,-1,pmstring);
  2885. format(string,sizeof(string),""chat" Sucessfuly Sent a pm to %s", PlayerName(targetid));
  2886. SendClientMessage(playerid,-1,string);
  2887. }
  2888. else {
  2889. SendClientMessage(playerid,-1,""chat" This player is not accepting any personal messages");
  2890. }
  2891. }
  2892. return 1;
  2893. }
  2894.  
  2895. CMD:blockpm(playerid) return pInfo[playerid][pPM] = 1, SendClientMessage(playerid,-1,""chat" You are now blocking personal messages");
  2896. CMD:unblockpm(playerid) return pInfo[playerid][pPM] = 0, SendClientMessage(playerid,-1,""chat" You are not blocking any more personal messages");
  2897.  
  2898. CMD:ann(playerid,params[])
  2899. {
  2900. if(pInfo[playerid][pAdminLevel] >= 4 || IsPlayerAdmin(playerid))
  2901. {
  2902. if(isnull(params)) return SendClientMessage(playerid, -1, ""chat" /ann [Text]");
  2903. GameTextForAll(params,5000,3);
  2904. }
  2905. else {
  2906. SendClientMessage(playerid,-1,""chat" You must be a level 4 admin");
  2907. }
  2908. return 1;
  2909. }
  2910.  
  2911. CMD:ann2(playerid,params[])
  2912. {
  2913. if(pInfo[playerid][pAdminLevel] >= 3 || IsPlayerAdmin(playerid))
  2914. {
  2915. if(isnull(params)) return SendClientMessage(playerid, -1, ""chat" /ann2 [Text]");
  2916. SendClientMessageToAll(-1,params);
  2917. }
  2918. else {
  2919. SendClientMessage(playerid,-1,""chat" You must be a level 3 admin");
  2920. }
  2921. return 1;
  2922. }
  2923.  
  2924. CMD:warn(playerid,params[])
  2925. {
  2926. if(pInfo[playerid][pAdminLevel] >= 1 || IsPlayerAdmin(playerid))
  2927. {
  2928. new targetid,reason[105],string[256];
  2929. if(sscanf(params, "us[105]", targetid, reason)) return SendClientMessage(playerid,-1,""chat" /warn [playerid] [reason]");
  2930. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2931.  
  2932. new sentstring[128];
  2933.  
  2934. pInfo[targetid][pWarnings]++;
  2935.  
  2936. format(string,sizeof(string), "%s %s warned you\nReason: %s\nWarning Number: %i",GetAdminName(playerid),PlayerName(playerid), reason, pInfo[targetid][pWarnings]);
  2937. ShowPlayerDialog(targetid,DIALOG_WARN,DIALOG_STYLE_MSGBOX,"Warning",string,"I Understand","");
  2938. format(sentstring,sizeof(sentstring), ""chat""COL_LIGHTBLUE" %s %s has warned %s Reason: %s (%i / 3)",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason,pInfo[targetid][pWarnings]);
  2939. SendClientMessageToAll(-1,sentstring);
  2940.  
  2941. if(pInfo[targetid][pWarnings] >= 3)
  2942. {
  2943. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has kicked %s [Reason: %s][3 Warnings EXCEEDED]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
  2944. SendClientMessageToAll(-1,string);
  2945. Kick(targetid);
  2946. }
  2947. }
  2948. else {
  2949. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2950. }
  2951. return 1;
  2952. }
  2953.  
  2954. CMD:givexp(playerid,params[])
  2955. {
  2956. if(pInfo[playerid][pLogged] == 1)
  2957. {
  2958. if(pInfo[playerid][pAdminLevel] >= 4)
  2959. {
  2960. new targetid,givexp,string[256];
  2961. if(sscanf(params, "ui", targetid, givexp)) return SendClientMessage(playerid,-1,""chat" /givexp [playerid] [amount]");
  2962. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2963.  
  2964. if(givexp < -2000 || givexp > 2000) return SendClientMessage(playerid,-1,""chat" You can only give xp between Negative 2000 - Positive 2000");
  2965. pInfo[targetid][pXP] += givexp;
  2966.  
  2967. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has given %s %d xp",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),givexp);
  2968. SendClientMessageToAll(-1,string);
  2969. }
  2970. else {
  2971. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2972. }
  2973. }
  2974. else {
  2975. SendClientMessage(playerid,-1,""chat" Your not logged in");
  2976. Kick(playerid);
  2977. }
  2978. return 1;
  2979. }
  2980.  
  2981. CMD:givecoins(playerid,params[])
  2982. {
  2983. if(pInfo[playerid][pLogged] == 1)
  2984. {
  2985. if(pInfo[playerid][pAdminLevel] >= 3)
  2986. {
  2987. new targetid,givecoin,string[256];
  2988. if(sscanf(params, "ui", targetid, givecoin)) return SendClientMessage(playerid,-1,""chat" /givecoins [playerid] [amount]");
  2989. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  2990.  
  2991. if(givecoin < 1 || givecoin > 10) return SendClientMessage(playerid,-1,""chat" You can only give coins between 1 and 10");
  2992. pInfo[targetid][pCoins] += givecoin;
  2993.  
  2994. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has given %s %d Coins",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),givecoin);
  2995. SendClientMessageToAll(-1,string);
  2996. }
  2997. else {
  2998. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  2999. }
  3000. }
  3001. else {
  3002. SendClientMessage(playerid,-1,""chat" Your not logged in");
  3003. Kick(playerid);
  3004. }
  3005. return 1;
  3006. }
  3007.  
  3008. CMD:sharexp(playerid,params[])
  3009. {
  3010. if(pInfo[playerid][pLogged] == 1)
  3011. {
  3012. if(pInfo[playerid][pHour] >= 2)
  3013. {
  3014. new targetid,givexp,reason[105],stringxp[256];
  3015. if(sscanf(params,"uis[105]", targetid,givexp,reason)) return SendClientMessage(playerid,-1,""chat" /sharexp [playerid] [amount] [reason]");
  3016. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3017. if(targetid == playerid) return SendClientMessage(playerid,-1,""chat" You cannot give xp to yourself");
  3018. //if(givexp < 49 || givexp > 2000) return SendClientMessage(playerid,-1,""chat" You can only give xp between 50-2000");
  3019. if (givexp > 0 && pInfo[playerid][pXP] >= givexp)
  3020. {
  3021. pInfo[targetid][pXP] += givexp;
  3022. pInfo[playerid][pXP] -= givexp;
  3023. format(stringxp,sizeof(stringxp),""chat" Player %s has shared %d xp to %s [Reason: %s]", PlayerName(playerid), givexp, PlayerName(targetid), reason);
  3024. SendClientMessageToAll(-1,stringxp);
  3025. }
  3026. else
  3027. {
  3028. SendClientMessage(playerid,-1,""chat" You don't have enough XP");
  3029. }
  3030. }
  3031. else
  3032. {
  3033. SendClientMessage(playerid,-1,""chat" You must have atleast 2 hours ingame");
  3034. }
  3035. }
  3036. return 1;
  3037. }
  3038.  
  3039. CMD:xp(playerid,params[])
  3040. {
  3041. if(pInfo[playerid][pAdminLevel] >= 2)
  3042. {
  3043. new xpID,string[256],xpString[64];
  3044. if(sscanf(params, "i", xpID)) return SendClientMessage(playerid,-1,""chat" /xp [XP Type ID] (1normal,2double,3triple,4quad)");
  3045.  
  3046. Map[XPType] = xpID;
  3047. format(string,sizeof(string),""chat""COL_LIGHTBLUE" %s %s has changed the XP variable to %s",GetAdminName(playerid),PlayerName(playerid),GetXPName());
  3048. SendClientMessageToAll(-1,string);
  3049. format(xpString,sizeof(xpString),"%s",GetXPName());
  3050. TextDrawSetString(XP,xpString);
  3051. }
  3052. else return SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3053. return 1;
  3054. }
  3055.  
  3056. CMD:setxp(playerid,params[])
  3057. {
  3058. if(pInfo[playerid][pLogged] == 1)
  3059. {
  3060. if(pInfo[playerid][pAdminLevel] >= 4)
  3061. {
  3062. new targetid,givexp,string[256];
  3063. if(sscanf(params, "ui", targetid, givexp)) return SendClientMessage(playerid,-1,""chat" /setxp [playerid] [amount]");
  3064. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3065.  
  3066. pInfo[targetid][pXP] = givexp;
  3067.  
  3068. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has set %s xp to %d",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),givexp);
  3069. SendClientMessageToAll(-1,string);
  3070. }
  3071. else {
  3072. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3073. }
  3074. }
  3075. else {
  3076. SendClientMessage(playerid,-1,""chat" Your not logged in");
  3077. Kick(playerid);
  3078. }
  3079. return 1;
  3080. }
  3081.  
  3082. CMD:savestats(playerid)
  3083. {
  3084. if(pInfo[playerid][pLogged] == 1)
  3085. {
  3086. SaveStats(playerid);
  3087. SendClientMessage(playerid,-1,""chat" Saved Stats");
  3088. }
  3089. return 1;
  3090. }
  3091.  
  3092. CMD:ss(playerid) return cmd_savestats(playerid);
  3093.  
  3094. CMD:stats(playerid)
  3095. {
  3096. new string[800];
  3097. new Float:kd = floatdiv(pInfo[playerid][pKills], pInfo[playerid][pDeaths]);
  3098. new Float:wins = floatdiv(pInfo[playerid][pMapsPlayed], pInfo[playerid][pEvac]);
  3099. format(string,sizeof(string)," {37DB45}Viewing player stats: Yourself{FFFFFF} \nCoins %i\nXP %i\nKills %i\nDeaths %i\nMaps Played %i\nRank %i\nEvac Points %i\nAdmin Level %s\nVip Level %i\n\
  3100. Played %d Hours || %d Minutes || %d Seconds\nK:D RATIO: %0.2f\nWin RATIO: %0.2f",pInfo[playerid][pCoins],pInfo[playerid][pXP],pInfo[playerid][pKills],pInfo[playerid][pDeaths],pInfo[playerid][pMapsPlayed],
  3101. pInfo[playerid][pRank],pInfo[playerid][pEvac],GetAdminName(playerid),pInfo[playerid][pVipLevel],pInfo[playerid][pHour],pInfo[playerid][pMin],pInfo[playerid][pSec],kd,wins);
  3102.  
  3103. ShowPlayerDialog(playerid,1888,DIALOG_STYLE_MSGBOX,"Viewing Stats!",string,"Close","");
  3104. return 1;
  3105. }
  3106.  
  3107. CMD:pstats(playerid,params[])
  3108. {
  3109. if(pInfo[playerid][pXP] >= 20)
  3110. {
  3111. new targetid;
  3112. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /pstats [playerid]");
  3113. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3114. {
  3115. new string[800];
  3116. new Float:kd = floatdiv(pInfo[targetid][pKills], pInfo[targetid][pDeaths]);
  3117. new Float:wins = floatdiv(pInfo[targetid][pMapsPlayed], pInfo[targetid][pEvac]);
  3118. format(string,sizeof(string)," {37DB45}Viewing player stats: %s{FFFFFF} \nCoins %i\nXP %i\nKills %i\nDeaths %i\nMaps Played %i\nRank %i\nEvac Points %i\nAdmin Level %s\nVip Level %i\n\
  3119. Played %d Hours || %d Minutes || %d Seconds\nK:D RATIO: %0.2f\nWin RATIO: %0.2f",PlayerName(targetid),pInfo[targetid][pCoins],pInfo[targetid][pXP],pInfo[targetid][pKills],pInfo[targetid][pDeaths],pInfo[targetid][pMapsPlayed],
  3120. pInfo[playerid][pRank],pInfo[targetid][pEvac],GetAdminName(targetid),pInfo[targetid][pVipLevel],pInfo[targetid][pHour],pInfo[targetid][pMin],pInfo[targetid][pSec],kd,wins);
  3121.  
  3122. ShowPlayerDialog(playerid,1888,DIALOG_STYLE_MSGBOX,"Viewing Stats!",string,"Close","");
  3123. }
  3124. }
  3125. else return SendXPError(playerid,20);
  3126. return 1;
  3127. }
  3128.  
  3129. CMD:settime(playerid,params[])
  3130. {
  3131. if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid))
  3132. {
  3133. new time2,string[128];
  3134. if(sscanf(params, "i", time2)) return SendClientMessage(playerid,-1,""chat" /settime [time]");
  3135.  
  3136. SetWorldTime(time2);
  3137.  
  3138. if(IsPlayerAdmin(playerid))
  3139. {
  3140. format(string, sizeof(string), ""chat" Time Changed To %d",time2);
  3141. SendClientMessageToAll(-1,string);
  3142. }
  3143. else
  3144. {
  3145. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has changed the time to %d",GetAdminName(playerid),PlayerName(playerid),time2);
  3146. SendClientMessageToAll(-1,string);
  3147. }
  3148. }
  3149. else {
  3150. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3151. }
  3152. return 1;
  3153. }
  3154.  
  3155. CMD:setweather(playerid,params[])
  3156. {
  3157. if(pInfo[playerid][pAdminLevel] >= 2 || IsPlayerAdmin(playerid))
  3158. {
  3159. new weather,string[128];
  3160. if(sscanf(params, "i", weather)) return SendClientMessage(playerid,-1,""chat" /setweather [weather id]");
  3161.  
  3162. SetWeather(weather);
  3163.  
  3164. if(IsPlayerAdmin(playerid))
  3165. {
  3166. format(string, sizeof(string), ""chat" Weather Changed to %d",weather);
  3167. SendClientMessageToAll(-1,string);
  3168. }
  3169. else
  3170. {
  3171. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has changed the weather to %d",GetAdminName(playerid),PlayerName(playerid),weather);
  3172. SendClientMessageToAll(-1,string);
  3173. }
  3174. }
  3175. else {
  3176. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3177. }
  3178. return 1;
  3179. }
  3180.  
  3181. CMD:ip(playerid, params[])
  3182. {
  3183. if(pInfo[playerid][pAdminLevel] >= 3)
  3184. {
  3185. new targetid,playerip[16],string[128];
  3186. if(sscanf(params, "u", targetid, playerip)) return SendClientMessage(playerid,-1,""chat" /ip [playerid]");
  3187. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3188.  
  3189. GetPlayerIp(targetid, playerip, sizeof(playerip));
  3190. format(string, sizeof(string), ""chat" IP of %s %s", PlayerName(targetid), playerip);
  3191. SendClientMessage(playerid, -1, string);
  3192. }
  3193. else {
  3194. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3195. }
  3196. return 1;
  3197. }
  3198.  
  3199. CMD:akill(playerid,params[])
  3200. {
  3201. if(pInfo[playerid][pAdminLevel] >= 1)
  3202. {
  3203. new targetid,string[256];
  3204. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /akill [playerid]");
  3205. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3206.  
  3207. SetPlayerHealth(targetid,0.0);
  3208.  
  3209. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has killed %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
  3210. SendClientMessageToAll(-1,string);
  3211. }
  3212. else {
  3213. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3214. }
  3215. return 1;
  3216. }
  3217.  
  3218. CMD:nuke(playerid,params[])
  3219. {
  3220. if(pInfo[playerid][pAdminLevel] >= 5)
  3221. {
  3222. new targetid,string[256];
  3223. if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /nuke [playerid]");
  3224. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3225.  
  3226. new Float:x,Float:y,Float:z;
  3227. GetPlayerPos(targetid,Float:x,Float:y,Float:z);
  3228. CreateExplosion(Float:x,Float:y,Float:z,0,5.0);
  3229.  
  3230. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has blown up %s",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
  3231. SendClientMessageToAll(-1,string);
  3232. }
  3233. else {
  3234. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3235. }
  3236. return 1;
  3237. }
  3238.  
  3239. CMD:get(playerid,params[])
  3240. {
  3241. if(pInfo[playerid][pAdminLevel] >= 2)
  3242. {
  3243. new targetid;
  3244. if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /get [playerid]");
  3245. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3246.  
  3247. new Float:x, Float:y, Float:z;
  3248. GetPlayerPos(playerid, x, y, z);
  3249. SetPlayerPos(targetid, x+1, y+1, z);
  3250.  
  3251. if(IsPlayerInAnyVehicle(targetid))
  3252. {
  3253. SetVehiclePos(GetPlayerVehicleID(targetid),x,y,z);
  3254. }
  3255. }
  3256. else {
  3257. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3258. }
  3259. return 1;
  3260. }
  3261.  
  3262. CMD:goto(playerid,params[])
  3263. {
  3264. if(pInfo[playerid][pAdminLevel] >= 2)
  3265. {
  3266. new targetid;
  3267. if(sscanf(params, "u", targetid)) SendClientMessage(playerid,-1,""chat" /goto [playerid]");
  3268. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3269.  
  3270. new Float:x,Float:y,Float:z,inter;
  3271. GetPlayerPos(targetid,Float:x,Float:y,Float:z);
  3272. inter = GetPlayerInterior(targetid);
  3273. SetPlayerPosEx(playerid,Float:x,Float:y,Float:z,inter,0);
  3274. }
  3275. else {
  3276. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3277. }
  3278. return 1;
  3279. }
  3280.  
  3281. CMD:mute(playerid,params[])
  3282. {
  3283. if(pInfo[playerid][pAdminLevel] >= 1)
  3284. {
  3285. new targetid,reason[105],string[128];
  3286. if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" /mute [playerid] [reason]");
  3287. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3288.  
  3289. pInfo[targetid][IsPlayerMuted] = 1;
  3290.  
  3291. format(string,sizeof(string),""chat""COL_LIGHTBLUE" %s %s muted %s [Reason: %s]", GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
  3292. SendMessageToAllAdmins(string,-1);
  3293.  
  3294. format(string,sizeof(string),""chat""COL_LIGHTBLUE" %s %s muted you for [Reason %s]",GetAdminName(playerid), PlayerName(playerid),reason);
  3295. SendClientMessage(targetid,-1,string);
  3296. }
  3297. else {
  3298. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3299. }
  3300. return 1;
  3301. }
  3302.  
  3303. CMD:unmute(playerid,params[])
  3304. {
  3305. if(pInfo[playerid][pAdminLevel] >= 1)
  3306. {
  3307. new targetid,string[128];
  3308. if(sscanf(params, "u", targetid)) return SendClientMessage(playerid,-1,""chat" /unmute [playerid]");
  3309. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3310.  
  3311. if(pInfo[targetid][IsPlayerMuted] == 1)
  3312. {
  3313. format(string,sizeof(string),""chat""COL_LIGHTBLUE" %s %s unmuted you",GetAdminName(playerid),PlayerName(playerid));
  3314. SendClientMessage(targetid,-1,string);
  3315. format(string,sizeof(string),""chat" You unmuted %s",PlayerName(targetid));
  3316. SendClientMessage(playerid,-1,string);
  3317. pInfo[targetid][IsPlayerMuted] = 0;
  3318. }
  3319. else
  3320. {
  3321. SendClientMessage(playerid,-1,""chat" Player isn't muted");
  3322. }
  3323. }
  3324. else {
  3325. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3326. }
  3327. return 1;
  3328. }
  3329.  
  3330. CMD:changename(playerid,params[])
  3331. {
  3332. if(pInfo[playerid][pAdminLevel] >= 4)
  3333. {
  3334. new targetid,newname[24],reason[105],string[256];
  3335. if(sscanf(params, "ds[24]s[105]",targetid,newname,reason)) return SendClientMessage(playerid,-1,""chat" /changename [ID] [New Name] [Reason]");
  3336. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3337.  
  3338. new escapename[24], Query[128];
  3339. mysql_real_escape_string(newname, escapename);
  3340. format(Query, sizeof(Query), "SELECT `user` FROM `playerinfo` WHERE `user` = '%s' LIMIT 1", escapename);
  3341. mysql_query(Query);
  3342. mysql_store_result();
  3343. new rows = mysql_num_rows();
  3344. if(!rows)
  3345. {
  3346. format(Query, sizeof(Query), "UPDATE `playerinfo` SET `user`= '%s' WHERE `user` ='%s'",escapename,PlayerName(targetid));
  3347. mysql_query(Query);
  3348. SetPlayerName(targetid,escapename);
  3349. format(string,sizeof(string),""chat""COL_LIGHTBLUE" %s %s changed your name to %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),newname, reason);
  3350. SendClientMessage(targetid,-1,string);
  3351. format(string,sizeof(string),""chat" You've changed ID %d name to %s [Reason: %s]",targetid, PlayerName(targetid), reason);
  3352. SendClientMessage(playerid,-1,string);
  3353. }
  3354. else if(rows == 1)
  3355. {
  3356. SendClientMessage(playerid, -1, ""chat" This name already exists!");
  3357. }
  3358. mysql_free_result();
  3359. }
  3360. else {
  3361. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3362. }
  3363. return 1;
  3364. }
  3365.  
  3366. CMD:kick(playerid,params[])
  3367. {
  3368. if(pInfo[playerid][pAdminLevel] >= 1)
  3369. {
  3370. new targetid,reason[105],string[256];
  3371. if(sscanf(params, "us[105]", targetid,reason)) return SendClientMessage(playerid,-1,""chat" /kick [playerid] [reason]");
  3372. if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
  3373.  
  3374. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" %s %s has kicked %s [Reason: %s]",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid),reason);
  3375. SendClientMessageToAll(-1,string);
  3376.  
  3377. Kick(targetid);
  3378. }
  3379. else {
  3380. SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
  3381. }
  3382. return 1;
  3383. }
  3384.  
  3385. public TimeOnServer(playerid)
  3386. {
  3387. pInfo[playerid][pSec] ++;
  3388. if(pInfo[playerid][pSec] >= 60)
  3389. {
  3390. pInfo[playerid][pMin]++;
  3391. pInfo[playerid][pSec]=0;
  3392. }
  3393. if(pInfo[playerid][pMin] >= 60)
  3394. {
  3395. pInfo[playerid][pMin]=0;
  3396. pInfo[playerid][pHour]++;
  3397. }
  3398. return 1;
  3399. }
  3400.  
  3401. function RandomMessages()
  3402. {
  3403. new randomMsg = random(sizeof(randomMessages));
  3404. SendClientMessageToAll(-1, randomMessages[randomMsg]);
  3405. }
  3406.  
  3407. stock MySQL_Register(playerid, passwordstring[])
  3408. {
  3409. new Query[500],IP[16];
  3410. GetPlayerIp(playerid, IP, sizeof(IP));
  3411.  
  3412. strcat(Query,"INSERT INTO `users` (`Username`,`Password`,`pXP`,`pKills`,`pDeaths`,`pRank`, `pLevel`,`pAdminLevel`");
  3413. strcat(Query,",`pVipLevel`, `pHour`, `pMin`, `pSec`, `pMapsPlayed`, `pCoins`, `pIP`) VALUES ('%s', sha1('%s'),1,0,0,0,0,0,0,0,0,0,0,0,'%s')");
  3414. format(Query,sizeof(Query),Query,PlayerName(playerid),passwordstring,IP);
  3415. mysql_query(Query);
  3416.  
  3417. playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
  3418. pInfo[playerid][pLogged] = 1;
  3419. CheckBan(playerid);
  3420. return 1;
  3421. }
  3422.  
  3423. stock MySQL_Login(playerid)
  3424. {
  3425. new Query[600];
  3426. format(Query, sizeof(Query), "SELECT * FROM `users` WHERE Username = '%s'", PlayerName(playerid));
  3427. mysql_query(Query);
  3428. mysql_store_result();
  3429. mysql_fetch_row_format(Query, "|");
  3430. //sscanf(Query, "e<p<|>s[24]s[128]iiiiiiiiiis[16]i",pInfo[playerid]);
  3431.  
  3432. sscanf(Query, "p<|>s[24]s[128]iiiiiiiiiiii",pInfo[playerid][pUsername],
  3433. pInfo[playerid][pPassword],pInfo[playerid][pXP],pInfo[playerid][pKills],pInfo[playerid][pDeaths],
  3434. pInfo[playerid][pRank],pInfo[playerid][pEvac],pInfo[playerid][pAdminLevel],pInfo[playerid][pVipLevel],
  3435. pInfo[playerid][pHour],pInfo[playerid][pMin],pInfo[playerid][pSec],pInfo[playerid][pMapsPlayed],pInfo[playerid][pCoins]);
  3436. printf("%s",Query);
  3437. pInfo[playerid][pLogged] = 1;
  3438. mysql_free_result();
  3439. CheckBan(playerid);
  3440. playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
  3441. return 1;
  3442. }
  3443.  
  3444. stock ClearChat()
  3445. {
  3446. for(new a = 0; a < 20; a++) SendClientMessageToAll(-1, " ");
  3447. return 1;
  3448. }
  3449.  
  3450. stock ResetVars(playerid)
  3451. {
  3452. pInfo[playerid][pUsername] = 0;
  3453. pInfo[playerid][pPassword] = 0;
  3454. pInfo[playerid][pXP] = 0;
  3455. pInfo[playerid][pKills] = 0;
  3456. pInfo[playerid][pDeaths] = 0;
  3457. pInfo[playerid][pRank] = 0;
  3458. pInfo[playerid][pEvac] = 0;
  3459. pInfo[playerid][pAdminLevel] = 0;
  3460. pInfo[playerid][pVipLevel] = 0;
  3461. pInfo[playerid][pHour] = 0;
  3462. pInfo[playerid][pMin] = 0;
  3463. pInfo[playerid][pSec] = 0;
  3464. pInfo[playerid][pMapsPlayed] = 0;
  3465. pInfo[playerid][pCoins] = 0;
  3466. pInfo[playerid][pLogged] = 0;
  3467. pInfo[playerid][pWarnings] = 0;
  3468. pInfo[playerid][pPM] = 0;
  3469. pInfo[playerid][IsPlayerMuted] = 0;
  3470. pInfo[playerid][Killstreak] = 0;
  3471. pInfo[playerid][pHumanClass] = 0;
  3472. pInfo[playerid][pZombieClass] = 0;
  3473. pInfo[playerid][IsPlayerInfected] = 0;
  3474. pInfo[playerid][Boxes] = 0;
  3475. pInfo[playerid][BoxesAdvanced] = 0;
  3476. pInfo[playerid][pVipKickBack] = 0;
  3477. pInfo[playerid][pVipFlash] = 0;
  3478. pInfo[playerid][pVipBoxes] = 0;
  3479. pInfo[playerid][pLadders] = 0;
  3480. pInfo[playerid][pKickBackCoin] = 0;
  3481. pInfo[playerid][pDamageShotgunCoin] = 0;
  3482. pInfo[playerid][pDamageDeagleCoin] = 0;
  3483. pInfo[playerid][pDamageMP5Coin] = 0;
  3484. pInfo[playerid][pDoctorShield] = 0;
  3485. Abilitys[playerid][HighJumpScout] = 0;
  3486. Abilitys[playerid][HighJumpZombie] = 0;
  3487. Abilitys[playerid][StomperPushing] = 0;
  3488. Abilitys[playerid][WitchAttack] = 0;
  3489. Abilitys[playerid][ScreamerZombieAb] = 0;
  3490. Abilitys[playerid][InfectionNormal] = 0;
  3491. Abilitys[playerid][InfectionMutated] = 0;
  3492. Abilitys[playerid][ShoutCooldown] = 0;
  3493. Abilitys[playerid][HealCoolDown] = 0;
  3494. Abilitys[playerid][ScreamerZombieAb2] = 0;
  3495. Abilitys[playerid][WitchAttack2] = 0;
  3496. Abilitys[playerid][InfectionFleshEater] = 0;
  3497. KillTimer(playedtimer[playerid]);
  3498. CurePlayer(playerid);
  3499. KillTimer(pInfo[playerid][IsPlayerInfectedTimer]);
  3500. SetPVarInt(playerid, "SPS Messages Sent", 0);
  3501. SetPVarInt(playerid, "SPS Muted", 0);
  3502. SetPVarInt(playerid, "SPS Spam Warnings", 0);
  3503. //SPS_Reset_PVars();
  3504. return 1;
  3505. }
  3506.  
  3507. stock ResetCoinVars(playerid)
  3508. {
  3509. pInfo[playerid][pKickBackCoin] = 0;
  3510. pInfo[playerid][pDamageShotgunCoin] = 0;
  3511. pInfo[playerid][pDamageDeagleCoin] = 0;
  3512. pInfo[playerid][pDamageMP5Coin] = 0;
  3513. return 1;
  3514. }
  3515.  
  3516. stock ConnectVars(playerid)
  3517. {
  3518. TextDrawShowForPlayer(playerid, ServerIntroOne[playerid]);
  3519. TextDrawShowForPlayer(playerid, ServerIntroTwo[playerid]);
  3520. pInfo[playerid][pHumanClass] = CIVILIAN;
  3521. pInfo[playerid][pZombieClass] = STANDARDZOMBIE;
  3522. team[playerid] = 0;
  3523. return 1;
  3524. }
  3525.  
  3526. stock SaveStats(playerid)
  3527. {
  3528. new Query[850];
  3529. format(Query, sizeof(Query), "UPDATE `users` SET `pXP` = '%d', `pKills` = '%d', `pDeaths` = '%d', `pRank` = '%d', `pLevel` = '%d',`pAdminLevel` = '%d', `pVipLevel` = '%d', `pHour` = '%d', `pMin` = '%d', `pSec` = '%d', `pMapsPlayed` = '%d', `pCoins` = '%d' WHERE `Username` = '%s'",
  3530. pInfo[playerid][pXP],
  3531. pInfo[playerid][pKills],
  3532. pInfo[playerid][pDeaths],
  3533. pInfo[playerid][pRank],
  3534. pInfo[playerid][pEvac],
  3535. pInfo[playerid][pAdminLevel],
  3536. pInfo[playerid][pVipLevel],
  3537. pInfo[playerid][pHour],
  3538. pInfo[playerid][pMin],
  3539. pInfo[playerid][pSec],
  3540. pInfo[playerid][pMapsPlayed],
  3541. pInfo[playerid][pCoins],
  3542. PlayerName(playerid));
  3543. mysql_query(Query);
  3544. return 1;
  3545. }
  3546.  
  3547. stock PlayerName(playerid)
  3548. {
  3549. new CName[24];
  3550. GetPlayerName(playerid, CName, 24);
  3551. return CName;
  3552. }
  3553.  
  3554. /*
  3555. stock CheckBan(playerid)
  3556. {
  3557. new Query[800],mip[255];
  3558. gpci(playerid, mip, 255);
  3559. format(Query, sizeof(Query), "SELECT * FROM `users` WHERE (`pBanSerial` = '%s') LIMIT 1", mip);
  3560. mysql_query(Query);
  3561. mysql_store_result();
  3562. new largestringtwo[500];
  3563. new string[128];
  3564. if(mysql_num_rows() != 0)
  3565. {
  3566. new Name2[24],BannedName[24];
  3567. while(mysql_fetch_row(Query))
  3568. {
  3569. mysql_fetch_field_row(string, "pBannedReason");
  3570. mysql_fetch_field_row(Name2, "pBannedBy");
  3571. mysql_fetch_field_row(BannedName, "Username");
  3572. }
  3573. format(largestringtwo, sizeof(largestringtwo), "You are currently banned from this server. \r\nUser:%s \r\nReason:%s\r\nAdmin:%s", BannedName, string, Name2);
  3574. ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "You are banned from this server", largestringtwo, "Ok", "Cancel");
  3575. Kick(playerid);
  3576. }
  3577. mysql_free_result();
  3578. return 1;
  3579. }
  3580. */
  3581.  
  3582. stock CheckBan(playerid)
  3583. {
  3584. new Query[500],playerIP[16],timeBanned[256],largestringtwo[256],adminName[24],bannedName[24],reasonBanned[128];
  3585. GetPlayerIp(playerid, playerIP, sizeof(playerIP));
  3586. format(Query, sizeof(Query), "SELECT * FROM `banlog` WHERE ( `Name` = '%s' OR `pIPBanned` = '%s' ) AND `pAccountLock` = '1' LIMIT 1",PlayerName(playerid),playerIP);
  3587. mysql_query(Query);
  3588. mysql_store_result();
  3589. if(mysql_num_rows() != 0)
  3590. {
  3591. while(mysql_fetch_row(Query))
  3592. {
  3593. mysql_fetch_field_row(reasonBanned, "pBannedReason");
  3594. mysql_fetch_field_row(adminName, "pBannedBy");
  3595. mysql_fetch_field_row(timeBanned, "pTime");
  3596. mysql_fetch_field_row(playerIP, "pIPBanned");
  3597. mysql_fetch_field_row(bannedName, "Name");
  3598. }
  3599. format(largestringtwo, sizeof(largestringtwo), "You are currently banned from this server. \r\nUser: %s \r\nIP: %s \r\nTime: %s \r\nAdmin: %s\r\nReason: %s", bannedName, playerIP, timeBanned, adminName, reasonBanned);
  3600. ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "You are banned from this server", largestringtwo, "Leave", "");
  3601. Kick(playerid);
  3602. printf("Username %s || IP %s is banned!",PlayerName(playerid),playerIP);
  3603. }
  3604. return 1;
  3605. }
  3606.  
  3607. stock BanPlayer(playerid,reason[],admin[])
  3608. {
  3609. new playerIP[16],Hour, Minute, Second, Year, Month, Day,timeBanned[200],bannedstring[256],Query[500];
  3610. GetPlayerIp(playerid, playerIP, sizeof(playerIP));
  3611.  
  3612. gettime(Hour, Minute, Second);
  3613. getdate(Year, Month, Day);
  3614. format(timeBanned, sizeof(timeBanned), "%02d:%02d:%02d on %02d/%02d/%d", Hour, Minute, Second, Day, Month, Year);
  3615. //format(Query, sizeof(Query), "UPDATE `users` SET `pBannedReason` = '%s', `pBannedBy` = '%s', `pIPBanned` = '%s', `pTime` = '%s', `pAccountLock` = '1' WHERE `Username` = '%s'", reason,admin,playerIP,timeBanned,PlayerName(playerid));
  3616. format(Query, sizeof(Query), "INSERT INTO `banlog` (`Name`, `pBannedReason`, `pBannedBy`, `pTime`, `pIPBanned`, `pAccountLock`) VALUES ('%s', '%s', '%s', '%s', '%s', 1)", PlayerName(playerid), reason, admin, timeBanned, playerIP);
  3617. mysql_query(Query);
  3618. mysql_free_result();
  3619. format(bannedstring,sizeof(bannedstring),"You are currently banned from this server. \r\nUser: %s \r\nIP: %s \r\nTime: %s \r\nAdmin: %s\r\nReason: %s",PlayerName(playerid),playerIP,timeBanned,admin,reason);
  3620. ShowPlayerDialog(playerid,DIALOG_BANNED,DIALOG_STYLE_MSGBOX,"You have been banned!",bannedstring,"Leave","");
  3621. Kick(playerid);
  3622. return 1;
  3623. }
  3624.  
  3625. GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
  3626. {
  3627. new Float:a;
  3628. GetPlayerPos(playerid, x, y, a);
  3629. GetPlayerFacingAngle(playerid, a);
  3630. if (GetPlayerVehicleID(playerid)) {
  3631. GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
  3632. }
  3633. x += (distance * floatsin(-a, degrees));
  3634. y += (distance * floatcos(-a, degrees));
  3635. }
  3636.  
  3637.  
  3638. stock SetPlayerPosEx( playerid, Float: posx, Float: posy, Float: posz, interior, virtualworld )
  3639. {
  3640. if( GetPlayerState( playerid ) == 2 )
  3641. {
  3642. SetPlayerVirtualWorld( playerid, virtualworld );
  3643. SetVehicleVirtualWorld( GetPlayerVehicleID( playerid ), virtualworld );
  3644. LinkVehicleToInterior( GetPlayerVehicleID( playerid ), interior );
  3645. SetPlayerInterior( playerid, interior );
  3646. SetVehiclePos( GetPlayerVehicleID( playerid ), posx, posy, posz );
  3647. return 1;
  3648. }
  3649. else
  3650. {
  3651. SetPlayerVirtualWorld( playerid, virtualworld );
  3652. SetPlayerInterior( playerid, interior );
  3653. SetPlayerPos( playerid, posx, posy, posz );
  3654. return 1;
  3655. }
  3656. }
  3657.  
  3658. stock SendMessageToAllAdmins(message[], color)
  3659. {
  3660. foreach(Player, i)
  3661. {
  3662. if(pInfo[i][pAdminLevel] >= 1 || IsPlayerAdmin(i))
  3663. {
  3664. SendClientMessage(i, color, message);
  3665. }
  3666. }
  3667. return 1;
  3668. }
  3669.  
  3670. stock SendZMessage(message[], color)
  3671. {
  3672. foreach(Player, i)
  3673. {
  3674. if(team[i] == TEAM_ZOMBIE)
  3675. {
  3676. SendClientMessage(i, color, message);
  3677. }
  3678. }
  3679. return 1;
  3680. }
  3681.  
  3682. stock SendHMessage(message[], color)
  3683. {
  3684. foreach(Player, i)
  3685. {
  3686. if(team[i] == TEAM_HUMAN)
  3687. {
  3688. SendClientMessage(i, color, message);
  3689. }
  3690. }
  3691. return 1;
  3692. }
  3693.  
  3694. stock SendXPError(playerid,xp)
  3695. {
  3696. new string[128];
  3697. format(string,sizeof(string),""chat""COL_PINK" You need atleast %i XP to use this class or command",xp);
  3698. SendClientMessage(playerid,-1,string);
  3699. return 1;
  3700. }
  3701.  
  3702. stock SendCoinError(playerid,coin)
  3703. {
  3704. new string[128];
  3705. format(string,sizeof(string),""chat""COL_PINK" You need %i coins to use this feature!",coin);
  3706. SendClientMessage(playerid,-1,string);
  3707. return 1;
  3708. }
  3709.  
  3710. stock SendVipError(playerid,viplevel)
  3711. {
  3712. new string[128];
  3713. format(string,sizeof(string),""chat""COL_PINK" You need vip package %i to use this command!",viplevel);
  3714. SendClientMessage(playerid,-1,string);
  3715. return 1;
  3716. }
  3717.  
  3718. stock GivePlayerXP(playerid,xp)
  3719. {
  3720. new string[128];
  3721. pInfo[playerid][pXP] += xp;
  3722. format(string,sizeof(string),"~n~~n~~n~~n~~n~~y~+%i",xp);
  3723. GameTextForPlayer(playerid,string,3500,5);
  3724. return 1;
  3725. }
  3726.  
  3727. stock GetMapCount()
  3728. {
  3729. new mcount = 0, file[128];
  3730. for(new i = 0; i < MAX_MAP_FILES; i++)
  3731. {
  3732. format(file, sizeof(file), "/Maps/%d.ini", i);
  3733. if(fexist(file))
  3734. {
  3735. mcount ++;
  3736. }
  3737. }
  3738. return mcount;
  3739. }
  3740.  
  3741. stock GetFreeMapID()
  3742. {
  3743. new file[32], id = 0;
  3744. for(new i = 0; i < MAX_MAP_FILES; i++)
  3745. {
  3746. format(file, sizeof(file), "/Maps/%d.ini", i);
  3747. if(fexists(file)) continue;
  3748. id = i;
  3749. break;
  3750. }
  3751. return id;
  3752. }
  3753.  
  3754. stock NoMapCheck()
  3755. {
  3756. new tcount = 0, file[128];
  3757. for(new i = 0; i < MAX_MAP_FILES; i++)
  3758. {
  3759. format(file, sizeof(file), "/Maps/%d.ini", i);
  3760. if(fexist(file))
  3761. {
  3762. tcount ++;
  3763. }
  3764. }
  3765. if(tcount == 0)
  3766. {
  3767. print("_____________________________________________________________");
  3768. print("WARNING: The server has detected there are no map files!");
  3769. print("currently installed. The server has been set to");
  3770. print("automatically shut down in 25000/ MS. (25 Seconds)");
  3771. print("_____________________________________________________________");
  3772. SetTimer("No_Maps", 25000, false);
  3773. return 1;
  3774. }
  3775. return 1;
  3776. }
  3777.  
  3778. function No_Maps() return SendRconCommand("exit");
  3779.  
  3780. public load_Map_basic(Mapid, name[], value[])
  3781. {
  3782. if(strcmp(name, "FSMapName", true) == 0)
  3783. {
  3784. strmid(Map[FSMapName], value, false, strlen(value), 128);
  3785. LoadFilterScript(Map[FSMapName]);
  3786. }
  3787.  
  3788. /*printf("[Debug] Name: %s - Value: %s", name, value); For Debug Purposes*/
  3789.  
  3790. if(strcmp(name, "MapName", true) == 0)
  3791. {
  3792. new mpname[50];
  3793. strmid(Map[MapName], value, false, strlen(value), 128);
  3794. format(mpname, sizeof(mpname), "mapname %s", Map[MapName]);
  3795. SendRconCommand(mpname);
  3796. }
  3797.  
  3798. if(strcmp(name, "HumanSpawnX", true) == 0) Map[HumanSpawnX] = floatstr(value);
  3799. if(strcmp(name, "HumanSpawnY", true) == 0) Map[HumanSpawnY] = floatstr(value);
  3800. if(strcmp(name, "HumanSpawnZ", true) == 0) Map[HumanSpawnZ] = floatstr(value);
  3801. if(strcmp(name, "HumanSpawn2X", true) == 0) Map[HumanSpawn2X] = floatstr(value);
  3802. if(strcmp(name, "HumanSpawn2Y", true) == 0) Map[HumanSpawn2Y] = floatstr(value);
  3803. if(strcmp(name, "HumanSpawn2Z", true) == 0) Map[HumanSpawn2Z] = floatstr(value);
  3804. if(strcmp(name, "ZombieSpawnX", true) == 0) Map[ZombieSpawnX] = floatstr(value);
  3805. if(strcmp(name, "ZombieSpawnY", true) == 0) Map[ZombieSpawnY] = floatstr(value);
  3806. if(strcmp(name, "ZombieSpawnZ", true) == 0) Map[ZombieSpawnZ] = floatstr(value);
  3807. if(strcmp(name, "Interior", true) == 0) Map[Interior] = strval(value);
  3808. if(strcmp(name, "GateX", true) == 0) Map[GateX] = floatstr(value);
  3809. if(strcmp(name, "GateY", true) == 0) Map[GateY] = floatstr(value);
  3810. if(strcmp(name, "GateZ", true) == 0) Map[GateZ] = floatstr(value);
  3811. if(strcmp(name, "CPx", true) == 0) Map[CPx] = floatstr(value);
  3812. if(strcmp(name, "CPy", true) == 0) Map[CPy] = floatstr(value);
  3813. if(strcmp(name, "CPz", true) == 0) Map[CPz] = floatstr(value);
  3814. if(strcmp(name, "GaterX", true) == 0) Map[GaterX] = floatstr(value);
  3815. if(strcmp(name, "GaterY", true) == 0) Map[GaterY] = floatstr(value);
  3816. if(strcmp(name, "GaterZ", true) == 0) Map[GaterZ] = floatstr(value);
  3817. if(strcmp(name, "MoveGate", true) == 0) Map[MoveGate] = strval(value);
  3818. if(strcmp(name, "GateID", true) == 0) Map[GateID] = strval(value);
  3819. if(strcmp(name, "AllowWater", true) == 0) Map[AllowWater] = strval(value);
  3820. if(strcmp(name, "EvacType", true) == 0) Map[EvacType] = strval(value);
  3821. if(strcmp(name, "Weather", true) == 0)
  3822. {
  3823. Map[Weather] = strval(value);
  3824. SetWeather(Map[Weather]);
  3825. }
  3826.  
  3827. if(strcmp(name, "Time", true) == 0)
  3828. {
  3829. Map[Time] = strval(value);
  3830. SetWorldTime(Map[Time]);
  3831. printf("Map ID %d's Information Has Been Loaded.", Mapid);
  3832. }
  3833. return 1;
  3834. }
  3835.  
  3836. stock LoadMap(Mapid)
  3837. {
  3838. new Map_file[64];
  3839. format(Map_file, sizeof(Map_file), "/Maps/%d.ini", Mapid);
  3840. if(fexist(Map_file))
  3841. {
  3842. printf("loading Map %s", Map_file);
  3843. INI_ParseFile(Map_file, "load_Map_%s", .bExtra = true, .extra = Mapid);
  3844. return 1;
  3845. }
  3846. return 0;
  3847. }
  3848.  
  3849. stock LoadNewMap()
  3850. {
  3851. new file[64];
  3852. mapid %= MAX_MAP_FILES;
  3853. format(file, sizeof(file), "/Maps/%d.ini", mapid);
  3854. if(!fexist(file)) return printf("[NOTICE] File Bugged.");
  3855. LastMapStarted = mapid;
  3856. mapid++;
  3857. return mapid-1;
  3858. }
  3859.  
  3860. stock ClearObjects()
  3861. {
  3862. for(new i; i<MAX_OBJECTS; i++)
  3863. {
  3864. if(IsValidObject(i)) DestroyObject(i);
  3865. }
  3866. }
  3867.  
  3868. stock DestroyAllVehicle()
  3869. {
  3870. for(new i=1;i<=MAX_VEHICLES;i++)
  3871. {
  3872. DestroyVehicle(i);
  3873. }
  3874. return 1;
  3875. }
  3876.  
  3877. stock GetRandomMap()
  3878. {
  3879. new file[64];
  3880. new i = 0, count = 0, Maps[MAX_MAP_FILES], Mapid;
  3881. for( ; i != MAX_MAP_FILES; ++i)
  3882. {
  3883. if(LastMapStarted == i) continue;
  3884. format(file, sizeof(file), "/Maps/%d.ini", i);
  3885. if(fexist(file))
  3886. {
  3887. Maps[count] = i;
  3888. count++;
  3889. }
  3890. }
  3891. if(count == 0)
  3892. {
  3893. return NoMapCheck();
  3894. }
  3895. Mapid = Maps[random(count)];
  3896.  
  3897. format(file, sizeof(file), "/Maps/%d.ini", Mapid);
  3898. if(fexist(file))
  3899. {
  3900. LastMapStarted = Mapid;
  3901. return Mapid;
  3902. }
  3903. else return printf("[NOTICE] File Bugged.");
  3904. }
  3905.  
  3906. stock LoadFilterScript(filename[])
  3907. {
  3908. new string[128];
  3909. format(string, sizeof(string), "loadfs %s", filename);
  3910. SendRconCommand(string);
  3911. return 1;
  3912. }
  3913.  
  3914. stock UnloadFilterScript(filename[])
  3915. {
  3916. new string[128];
  3917. format(string, sizeof(string), "unloadfs %s", filename);
  3918. SendRconCommand(string);
  3919. return 1;
  3920. }
  3921.  
  3922. stock HumanSetup(playerid)
  3923. {
  3924. SetPlayerTeam(playerid,TEAM_HUMAN);
  3925. SetPlayerHealth(playerid,100.0);
  3926. team[playerid] = TEAM_HUMAN;
  3927. SetPlayerColor(playerid,COLOR_HUMAN);
  3928. return 1;
  3929. }
  3930.  
  3931. stock HumanSetup2(playerid)
  3932. {
  3933. SetPlayerTeam(playerid,TEAM_HUMAN);
  3934. SetPlayerHealth(playerid,100.0);
  3935. team[playerid] = TEAM_HUMAN;
  3936. SetPlayerColor(playerid,COLOR_HUMAN);
  3937. SpawnPlayer(playerid);
  3938. return 1;
  3939. }
  3940.  
  3941. stock ZombieSetup(playerid)
  3942. {
  3943. SetPlayerTeam(playerid,TEAM_ZOMBIE);
  3944. team[playerid] = TEAM_ZOMBIE;
  3945. SetPlayerColor(playerid,COLOR_ZOMBIE);
  3946. return 1;
  3947. }
  3948.  
  3949. stock ZombieSetup2(playerid)
  3950. {
  3951. SetPlayerTeam(playerid,TEAM_ZOMBIE);
  3952. team[playerid] = TEAM_ZOMBIE;
  3953. SetPlayerColor(playerid,COLOR_ZOMBIE);
  3954. SpawnPlayer(playerid);
  3955. return 1;
  3956. }
  3957.  
  3958. public Float:GetDistanceBetweenPlayers(p1,p2)
  3959. {
  3960. new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
  3961. if(!IsPlayerConnected(p1) || !IsPlayerConnected(p2)) {
  3962. return -1.00;
  3963. }
  3964. GetPlayerPos(p1,x1,y1,z1);
  3965. GetPlayerPos(p2,x2,y2,z2);
  3966. return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
  3967. }
  3968.  
  3969. public GetClosestPlayer(p1)
  3970. {
  3971. new x,Float:dis,Float:dis2,player;
  3972. player = -1;
  3973. dis = 99999.99;
  3974. for (x=0;x<MAX_PLAYERS;x++) {
  3975. if(IsPlayerConnected(x)) {
  3976. if(x != p1) {
  3977. dis2 = GetDistanceBetweenPlayers(x,p1);
  3978. if(dis2 < dis && dis2 != -1.00) {
  3979. dis = dis2;
  3980. player = x;
  3981. }
  3982. }
  3983. }
  3984. }
  3985. return player;
  3986. }
  3987.  
  3988. stock IsPlayerInWater(playerid)
  3989. {
  3990. new animlib[32],tmp[32];
  3991. GetAnimationName(GetPlayerAnimationIndex(playerid),animlib,32,tmp,32);
  3992. if( !strcmp(animlib, "SWIM") && !IsPlayerInAnyVehicle(playerid) ) return true;
  3993. return false;
  3994. }
  3995.  
  3996. GetTeamPlayersAlive(teamid)
  3997. {
  3998. new count;
  3999. for(new i; i < playersAliveCount; i++)
  4000. {
  4001. if(IsPlayerConnected(i) && team[i] == teamid) count++;
  4002. }
  4003. return count;
  4004. }
  4005.  
  4006. stock OneZombie()
  4007. {
  4008. new count = 0;
  4009. new Random = Iter_Random(Player);
  4010. foreach(Player, i)
  4011. {
  4012. if(team[i] == TEAM_HUMAN) count++;
  4013. if(count == Iter_Count(Player))
  4014. {
  4015. ZombieSetup(Random);
  4016. }
  4017. }
  4018. return 1;
  4019. }
  4020.  
  4021. public RandomZombie() return Half();
  4022.  
  4023. stock Half()
  4024. {
  4025. new Humans;
  4026. foreach(Player, i)
  4027. {
  4028. if(Humans < 2)
  4029. {
  4030. HumanSetup(i);
  4031. ShowCoinDialog(i);
  4032. printf("Selected humans");
  4033. Humans ++;
  4034. }
  4035. else
  4036. {
  4037. ZombieSetup2(i);
  4038. printf("Selected zombies");
  4039. Humans = 0;
  4040. }
  4041. }
  4042. printf("Finished Selecting teams");
  4043. return 1;
  4044. }
  4045.  
  4046. stock EvenTeams(playerid)
  4047. {
  4048. new Humans, Zombies, rand = random(2);
  4049. if(rand == 0) // Setting ID 0 to Human and continuing with the cycle
  4050. {
  4051. foreach(Player, i)
  4052. {
  4053. if(Humans == Zombies)
  4054. {
  4055. HumanSetup2(i);
  4056. Humans ++;
  4057. }
  4058. else
  4059. {
  4060. ZombieSetup2(playerid);
  4061. Zombies ++;
  4062. }
  4063. }
  4064. }
  4065. else // Setting ID 0 to Zombie and continuing with the cycle
  4066. {
  4067. foreach(Player, i)
  4068. {
  4069. if(Humans == Zombies)
  4070. {
  4071. ZombieSetup2(i);
  4072. Zombies ++;
  4073. }
  4074. else
  4075. {
  4076. HumanSetup2(i);
  4077. Humans ++;
  4078. }
  4079. }
  4080. }
  4081. return 1;
  4082. }
  4083.  
  4084. stock DefaultTextdraws()
  4085. {
  4086. remadeText = TextDrawCreate(506.000000, 380.000000, "... || ZOMBIE APOCALYPSE || ...");
  4087. TextDrawBackgroundColor(remadeText, 255);
  4088. TextDrawFont(remadeText, 2);
  4089. TextDrawLetterSize(remadeText, 0.159999, 1.399999);
  4090. TextDrawColor(remadeText, 16777215);
  4091. TextDrawSetOutline(remadeText, 0);
  4092. TextDrawSetProportional(remadeText, 1);
  4093. TextDrawSetShadow(remadeText, 1);
  4094.  
  4095. remadeText2 = TextDrawCreate(517.000000, 389.000000, "Created by Chicken");
  4096. TextDrawBackgroundColor(remadeText2, 255);
  4097. TextDrawFont(remadeText2, 2);
  4098. TextDrawLetterSize(remadeText2, 0.140000, 1.200000);
  4099. TextDrawColor(remadeText2, -1);
  4100. TextDrawSetOutline(remadeText2, 0);
  4101. TextDrawSetProportional(remadeText2, 1);
  4102. TextDrawSetShadow(remadeText2, 1);
  4103.  
  4104. TimeLeft = TextDrawCreate(22.000000, 251.000000, "180");
  4105. TextDrawBackgroundColor(TimeLeft, 255);
  4106. TextDrawFont(TimeLeft, 3);
  4107. TextDrawLetterSize(TimeLeft, 1.770000, 3.499999);
  4108. TextDrawColor(TimeLeft, 16777215);
  4109. TextDrawSetOutline(TimeLeft, 0);
  4110. TextDrawSetProportional(TimeLeft, 1);
  4111. TextDrawSetShadow(TimeLeft, 1);
  4112.  
  4113. UntilRescue = TextDrawCreate(34.000000, 280.000000, "UNTIL EVAC");
  4114. TextDrawBackgroundColor(UntilRescue, 255);
  4115. TextDrawFont(UntilRescue, 1);
  4116. TextDrawLetterSize(UntilRescue, 0.380000, 0.900000);
  4117. TextDrawColor(UntilRescue, -1);
  4118. TextDrawSetOutline(UntilRescue, 0);
  4119. TextDrawSetProportional(UntilRescue, 1);
  4120. TextDrawSetShadow(UntilRescue, 1);
  4121.  
  4122. AliveInfo = TextDrawCreate(23.000000, 169.000000, "HUMANS ALIVE: 0~n~ZOMBIES ALIVE: 0~n~~r~SITE~W~:SKORO");
  4123. TextDrawBackgroundColor(AliveInfo, 255);
  4124. TextDrawFont(AliveInfo, 1);
  4125. TextDrawLetterSize(AliveInfo, 0.200000, 1.400000);
  4126. TextDrawColor(AliveInfo, -1);
  4127. TextDrawSetOutline(AliveInfo, 0);
  4128. TextDrawSetProportional(AliveInfo, 1);
  4129. TextDrawSetShadow(AliveInfo, 1);
  4130.  
  4131. XP = TextDrawCreate(502.000000, 11.000000, "~n~");
  4132. TextDrawBackgroundColor(XP, 255);
  4133. TextDrawFont(XP, 2);
  4134. TextDrawLetterSize(XP, 0.270000, 1.000000);
  4135. TextDrawColor(XP, 16777215);
  4136. TextDrawSetOutline(XP, 0);
  4137. TextDrawSetProportional(XP, 1);
  4138. TextDrawSetShadow(XP, 1);
  4139.  
  4140. CurrentMap = TextDrawCreate(42.000000, 289.000000, "Map: Loading");
  4141. TextDrawBackgroundColor(CurrentMap, 255);
  4142. TextDrawFont(CurrentMap, 2);
  4143. TextDrawLetterSize(CurrentMap, 0.190000, 0.700000);
  4144. TextDrawColor(CurrentMap, -1);
  4145. TextDrawSetOutline(CurrentMap, 0);
  4146. TextDrawSetProportional(CurrentMap, 1);
  4147. TextDrawSetShadow(CurrentMap, 1);
  4148.  
  4149. EventText = TextDrawCreate(503.000000, 397.000000, "Óäà÷íîãî äíÿ!");
  4150. TextDrawBackgroundColor(EventText, 255);
  4151. TextDrawFont(EventText, 2);
  4152. TextDrawLetterSize(EventText, 0.300000, 1.000000);
  4153. TextDrawColor(EventText, -16776961);
  4154. TextDrawSetOutline(EventText, 0);
  4155. TextDrawSetProportional(EventText, 1);
  4156. TextDrawSetShadow(EventText, 1);
  4157.  
  4158. for(new i; i < MAX_PLAYERS; i ++)
  4159. {
  4160. Infected[i] = TextDrawCreate(2.000000, 1.000000, "~n~");
  4161. TextDrawBackgroundColor(Infected[i], 255);
  4162. TextDrawFont(Infected[i], 1);
  4163. TextDrawLetterSize(Infected[i], 0.500000, 50.000000);
  4164. TextDrawColor(Infected[i], -1);
  4165. TextDrawSetOutline(Infected[i], 0);
  4166. TextDrawSetProportional(Infected[i], 1);
  4167. TextDrawSetShadow(Infected[i], 1);
  4168. TextDrawUseBox(Infected[i], 1);
  4169. TextDrawBoxColor(Infected[i], 1174405190);
  4170. TextDrawTextSize(Infected[i], 640.000000, 0.000000);
  4171.  
  4172. iKilled[i] = TextDrawCreate(237.000000, 418.000000, "Loading");
  4173. TextDrawBackgroundColor(iKilled[i], 255);
  4174. TextDrawFont(iKilled[i], 2);
  4175. TextDrawLetterSize(iKilled[i], 0.200000, 1.000000);
  4176. TextDrawColor(iKilled[i], -1);
  4177. TextDrawSetOutline(iKilled[i], 0);
  4178. TextDrawSetProportional(iKilled[i], 1);
  4179. TextDrawSetShadow(iKilled[i], 1);
  4180.  
  4181. myXP[i] = TextDrawCreate(546.000000, 54.000000, "Loading");
  4182. TextDrawBackgroundColor(myXP[i], 255);
  4183. TextDrawFont(myXP[i], 2);
  4184. TextDrawLetterSize(myXP[i], 0.300000, 1.000000);
  4185. TextDrawColor(myXP[i], 16777215);
  4186. TextDrawSetOutline(myXP[i], 0);
  4187. TextDrawSetProportional(myXP[i], 1);
  4188. TextDrawSetShadow(myXP[i], 1);
  4189.  
  4190. ServerIntroOne[i] = TextDrawCreate(180.000000, 111.000000, "Zombie~n~ ~r~Apocalypse v"SCRIPT"");
  4191. TextDrawBackgroundColor(ServerIntroOne[i], 255);
  4192. TextDrawFont(ServerIntroOne[i], 3);
  4193. TextDrawLetterSize(ServerIntroOne[i], 0.800000, 4.000000);
  4194. TextDrawColor(ServerIntroOne[i], -1);
  4195. TextDrawSetOutline(ServerIntroOne[i], 0);
  4196. TextDrawSetProportional(ServerIntroOne[i], 1);
  4197. TextDrawSetShadow(ServerIntroOne[i], 1);
  4198.  
  4199. ServerIntroTwo[i] = TextDrawCreate(287.000000, 120.000000, "/help /class /stats /pstats /cmds~n~~r~ Only best zombie server arcade type for SA-MP!");
  4200. TextDrawBackgroundColor(ServerIntroTwo[i], 255);
  4201. TextDrawFont(ServerIntroTwo[i], 1);
  4202. TextDrawLetterSize(ServerIntroTwo[i], 0.220000, 1.200000);
  4203. TextDrawColor(ServerIntroTwo[i], -1);
  4204. TextDrawSetOutline(ServerIntroTwo[i], 0);
  4205. TextDrawSetProportional(ServerIntroTwo[i], 1);
  4206. TextDrawSetShadow(ServerIntroTwo[i], 1);
  4207. }
  4208. return 1;
  4209. }
  4210.  
  4211. stock UpdateAliveInfo()
  4212. {
  4213. new string[128];
  4214. format(string,sizeof(string),"~r~ZOMBIES: %d~n~~w~HUMANS: %d~n~~n~FORUMS: WWW.ZOMBIE-MOD.COM",GetTeamPlayersAlive(TEAM_ZOMBIE),GetTeamPlayersAlive(TEAM_HUMAN));
  4215. TextDrawSetString(AliveInfo,string);
  4216. return 1;
  4217. }
  4218.  
  4219. stock UpdateXPTextdraw(playerid)
  4220. {
  4221. new string[128];
  4222. format(string,sizeof(string),"%i",pInfo[playerid][pXP]);
  4223. TextDrawSetString(myXP[playerid],string);
  4224. return 1;
  4225. }
  4226.  
  4227. stock UpdateMapName()
  4228. {
  4229. new string[128];
  4230. format(string,sizeof(string),"Map: %s",Map[MapName]);
  4231. TextDrawSetString(CurrentMap,string);
  4232. return 1;
  4233. }
  4234.  
  4235. stock setClass(playerid)
  4236. {
  4237. if(team[playerid] == TEAM_HUMAN)
  4238. {
  4239. ResetPlayerWeapons(playerid);
  4240. switch(pInfo[playerid][pHumanClass])
  4241. {
  4242. case CIVILIAN:
  4243. {
  4244. GivePlayerWeapon(playerid,23,100);
  4245. GivePlayerWeapon(playerid,25,50);
  4246. switch(random(3))
  4247. {
  4248. case 0: SetPlayerSkin(playerid,44);
  4249. case 1: SetPlayerSkin(playerid,188);
  4250. case 2: SetPlayerSkin(playerid,261);
  4251. }
  4252. }
  4253.  
  4254. case POLICEMAN:
  4255. {
  4256. GivePlayerWeapon(playerid,24,100);
  4257. GivePlayerWeapon(playerid,25,100);
  4258. SetPlayerSkin(playerid,281);
  4259. }
  4260.  
  4261. case MEDIC:
  4262. {
  4263. GivePlayerWeapon(playerid,23,350);
  4264. GivePlayerWeapon(playerid,25,150);
  4265. SetPlayerArmour(playerid,50);
  4266. SetPlayerSkin(playerid,276);
  4267. }
  4268.  
  4269. case SCOUT:
  4270. {
  4271. GivePlayerWeapon(playerid,34,40);
  4272. GivePlayerWeapon(playerid,23,400);
  4273. SetPlayerSkin(playerid,230);
  4274. }
  4275.  
  4276. case HEAVYMEDIC:
  4277. {
  4278. GivePlayerWeapon(playerid,24,150);
  4279. GivePlayerWeapon(playerid,25,200);
  4280. SetPlayerArmour(playerid,95);
  4281. SetPlayerSkin(playerid,274);
  4282. }
  4283.  
  4284. case FARMER:
  4285. {
  4286. GivePlayerWeapon(playerid,24,200);
  4287. GivePlayerWeapon(playerid,30,100);
  4288. GivePlayerWeapon(playerid,33,40);
  4289. SetPlayerArmour(playerid,60);
  4290. SetPlayerSkin(playerid,161);
  4291. }
  4292.  
  4293. case ENGINEER:
  4294. {
  4295. GivePlayerWeapon(playerid,23,450);
  4296. GivePlayerWeapon(playerid,25,250);
  4297. SetPlayerArmour(playerid,50);
  4298. SetPlayerSkin(playerid,27);
  4299. }
  4300.  
  4301. case SWAT:
  4302. {
  4303. GivePlayerWeapon(playerid,29,300);
  4304. GivePlayerWeapon(playerid,24,100);
  4305. SetPlayerArmour(playerid,95);
  4306. SetPlayerSkin(playerid,285);
  4307. }
  4308.  
  4309. case HEAVYSHOTGUN:
  4310. {
  4311. GivePlayerWeapon(playerid,25,300);
  4312. GivePlayerWeapon(playerid,24,100);
  4313. SetPlayerArmour(playerid,50);
  4314. SetPlayerSkin(playerid,25);
  4315. }
  4316.  
  4317. case ADVANCEDMEDIC:
  4318. {
  4319. GivePlayerWeapon(playerid,31,100);
  4320. GivePlayerWeapon(playerid,24,150);
  4321. GivePlayerWeapon(playerid,25,350);
  4322. SetPlayerSkin(playerid,275);
  4323. SetPlayerArmour(playerid,95);
  4324. }
  4325.  
  4326. case ADVANCEDENGINEER:
  4327. {
  4328. GivePlayerWeapon(playerid,24,150);
  4329. GivePlayerWeapon(playerid,31,500);
  4330. SetPlayerArmour(playerid,95);
  4331. SetPlayerSkin(playerid,260);
  4332. }
  4333.  
  4334. case FEDERALAGENT:
  4335. {
  4336. GivePlayerWeapon(playerid,31,1000);
  4337. GivePlayerWeapon(playerid,24,500);
  4338. GivePlayerWeapon(playerid,25,400);
  4339. SetPlayerArmour(playerid,95);
  4340. SetPlayerSkin(playerid,163);
  4341. }
  4342.  
  4343. case KICKBACK:
  4344. {
  4345. GivePlayerWeapon(playerid,23,500);
  4346. GivePlayerWeapon(playerid,25,450);
  4347. GivePlayerWeapon(playerid,29,200);
  4348. SetPlayerSkin(playerid,149);
  4349. }
  4350.  
  4351. case ADVANCEDSCOUT:
  4352. {
  4353. GivePlayerWeapon(playerid,34,150);
  4354. GivePlayerWeapon(playerid,24,550);
  4355. SetPlayerArmour(playerid,50);
  4356. SetPlayerSkin(playerid,29);
  4357. }
  4358.  
  4359. case ASSASSIN:
  4360. {
  4361. GivePlayerWeapon(playerid,31,500);
  4362. GivePlayerWeapon(playerid,25,200);
  4363. SetPlayerArmour(playerid,60);
  4364. SetPlayerSkin(playerid,123);
  4365. }
  4366.  
  4367. case VIPENGINEER:
  4368. {
  4369. GivePlayerWeapon(playerid,31,1000);
  4370. GivePlayerWeapon(playerid,25,2000);
  4371. GivePlayerWeapon(playerid,24,500);
  4372. SetPlayerArmour(playerid,30.0);
  4373. SetPlayerSkin(playerid,16);
  4374. }
  4375.  
  4376. case VIPMEDIC:
  4377. {
  4378. GivePlayerWeapon(playerid,31,1000);
  4379. GivePlayerWeapon(playerid,24,500);
  4380. SetPlayerArmour(playerid,70.0);
  4381. SetPlayerSkin(playerid,279);
  4382. }
  4383.  
  4384. case VIPSCOUT:
  4385. {
  4386. GivePlayerWeapon(playerid,34,130);
  4387. GivePlayerWeapon(playerid,24,500);
  4388. SetPlayerArmour(playerid,30.0);
  4389. SetPlayerSkin(playerid,294);
  4390. }
  4391.  
  4392. case E_ENGINEER:
  4393. {
  4394. GivePlayerWeapon(playerid,24,200);
  4395. GivePlayerWeapon(playerid,25,100);
  4396. SetPlayerArmour(playerid,80.0);
  4397. SetPlayerSkin(playerid,260);
  4398. }
  4399.  
  4400. case SOLIDER:
  4401. {
  4402. GivePlayerWeapon(playerid,30,300);
  4403. GivePlayerWeapon(playerid,24,80);
  4404. SetPlayerArmour(playerid,70.0);
  4405. SetPlayerSkin(playerid,287);
  4406. }
  4407.  
  4408. case DOCTOR:
  4409. {
  4410. GivePlayerWeapon(playerid,23,150);
  4411. SetPlayerArmour(playerid,60.0);
  4412. SetPlayerSkin(playerid,70);
  4413. }
  4414. }
  4415. }
  4416.  
  4417. if(team[playerid] == TEAM_ZOMBIE)
  4418. {
  4419. ResetPlayerWeapons(playerid);
  4420. GivePlayerWeapon(playerid,9,1);
  4421. SetPlayerArmour(playerid,0);
  4422. switch(pInfo[playerid][pZombieClass])
  4423. {
  4424. case STANDARDZOMBIE: SetPlayerSkin(playerid,181);
  4425. case MUTATEDZOMBIE: SetPlayerSkin(playerid,1);
  4426. case FASTZOMBIE: SetPlayerSkin(playerid,162);
  4427. case REAPERZOMBIE: SetPlayerSkin(playerid,157);
  4428. case WITCHZOMBIE: SetPlayerSkin(playerid,196);
  4429. case BOOMERZOMBIE: SetPlayerSkin(playerid,264),SetPlayerHealth(playerid,15);
  4430. case STOMPERZOMBIE: SetPlayerSkin(playerid,239);
  4431. case SCREAMERZOMBIE: SetPlayerSkin(playerid,212);
  4432. case ADVANCEDMUTATED: SetPlayerSkin(playerid,15);
  4433. case ADVANCEDSCREAMER: SetPlayerSkin(playerid,134);
  4434. case FLESHEATER: SetPlayerSkin(playerid,213);
  4435. case ADVANCEDWITCH: SetPlayerSkin(playerid,198);
  4436. case ADVANCEDBOOMER: SetPlayerSkin(playerid,259);
  4437. }
  4438. }
  4439. return 1;
  4440. }
  4441.  
  4442. function ScreamerClearAnim(i) return ClearAnimations(i);
  4443.  
  4444. stock InfectPlayerStandard(playerid)
  4445. {
  4446. if(team[playerid] == TEAM_HUMAN)
  4447. {
  4448. if(pInfo[playerid][IsPlayerInfected] == 0)
  4449. {
  4450. pInfo[playerid][IsPlayerInfectedTimer] = SetTimerEx("StandardInfection",2000,1,"i",playerid);
  4451. SetPlayerColor(playerid,COLOR_PINK);
  4452. TextDrawShowForPlayer(playerid,Infected[playerid]);
  4453. pInfo[playerid][IsPlayerInfected] = 1;
  4454. }
  4455. }
  4456. return 1;
  4457. }
  4458.  
  4459. stock InfectPlayerMutated(playerid)
  4460. {
  4461. if(team[playerid] == TEAM_HUMAN)
  4462. {
  4463. if(pInfo[playerid][IsPlayerInfected] == 0)
  4464. {
  4465. pInfo[playerid][IsPlayerInfectedTimer] = SetTimerEx("MutatedInfection",1500,1,"i",playerid);
  4466. SetPlayerColor(playerid,COLOR_PINK);
  4467. TextDrawShowForPlayer(playerid,Infected[playerid]);
  4468. pInfo[playerid][IsPlayerInfected] = 1;
  4469. }
  4470. }
  4471. return 1;
  4472. }
  4473.  
  4474. stock InfectPlayerFleshEater(playerid)
  4475. {
  4476. if(team[playerid] == TEAM_HUMAN)
  4477. {
  4478. if(pInfo[playerid][IsPlayerInfected] == 0)
  4479. {
  4480. pInfo[playerid][IsPlayerInfectedTimer] = SetTimerEx("FleshEaterInfection",1500,1,"i",playerid);
  4481. SetPlayerColor(playerid,COLOR_PINK);
  4482. TextDrawShowForPlayer(playerid,Infected[playerid]);
  4483. pInfo[playerid][IsPlayerInfected] = 1;
  4484. }
  4485. }
  4486. return 1;
  4487. }
  4488.  
  4489. stock CurePlayer(playerid)
  4490. {
  4491. if(pInfo[playerid][IsPlayerInfected] == 1)
  4492. {
  4493. KillTimer(pInfo[playerid][IsPlayerInfectedTimer]);
  4494. pInfo[playerid][IsPlayerInfected] = 0;
  4495. SetPlayerColor(playerid,COLOR_HUMAN);
  4496. ApplyAnimation(playerid,"MEDIC","CPR",4.1,0,1,1,1,1);
  4497. SetPlayerDrunkLevel(playerid,0);
  4498. TextDrawHideForPlayer(playerid,Infected[playerid]);
  4499. }
  4500. return 1;
  4501. }
  4502.  
  4503. function StandardInfection(playerid)
  4504. {
  4505. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Infected",1000,5);
  4506. new Float:health;
  4507. GetPlayerHealth(playerid, health);
  4508. SetPlayerHealth(playerid, health - 2.5);
  4509. }
  4510.  
  4511. function MutatedInfection(playerid)
  4512. {
  4513. SetPlayerDrunkLevel(playerid,6000);
  4514. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Infected",1000,5);
  4515. new Float:health;
  4516. GetPlayerHealth(playerid, health);
  4517. SetPlayerHealth(playerid, health - 4.5);
  4518. return 1;
  4519. }
  4520.  
  4521. function FleshEaterInfection(playerid)
  4522. {
  4523. SetPlayerDrunkLevel(playerid,7500);
  4524. GameTextForPlayer(playerid,"~n~~n~~n~~n~~r~Flesh Eater Infection",1000,5);
  4525. new Float:health;
  4526. GetPlayerHealth(playerid, health);
  4527. SetPlayerHealth(playerid, health - 10.0);
  4528. return 1;
  4529. }
  4530.  
  4531. stock CheckToStartMap()
  4532. {
  4533. if(Map[IsStarted] == 0)
  4534. {
  4535. LoadMap(LoadNewMap());
  4536. StartMap();
  4537. Map[IsStarted] = 1;
  4538. }
  4539. return 1;
  4540. }
  4541.  
  4542. stock ChangeCameraView(playerid)
  4543. {
  4544. new Float:px,Float:py,Float:pz,Float:pa;
  4545. GetPlayerPos(playerid, px, py, pz);
  4546. GetPlayerFacingAngle(playerid, pa);
  4547. //px += floatsin ( -pa, degrees) * 1.5;
  4548. //py += floatcos ( -pa, degrees) * 1.5;
  4549. SetPlayerCameraPos(playerid, px, py, pz+6.0);
  4550. SetPlayerCameraLookAt(playerid, px, py, pz);
  4551.  
  4552. /*if(team[playerid] == TEAM_ZOMBIE)
  4553. {
  4554. ApplyAnimation(playerid, "PED", "KO_shot_stom",4.0,1,0,0,1,0);
  4555. }
  4556.  
  4557. if(team[playerid] == TEAM_HUMAN)
  4558. {
  4559. ApplyAnimation(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,1,0);
  4560. }*/
  4561. return 1;
  4562. }
  4563.  
  4564. stock SendPlayerMaxAmmo( playerid )
  4565. {
  4566. new slot, weap, ammo;
  4567.  
  4568. for ( slot = 0; slot < 14; slot++ ) {
  4569. GetPlayerWeaponData( playerid, slot, weap, ammo );
  4570. if ( IsValidWeapon( weap ) ) {
  4571. GivePlayerWeapon( playerid, weap, 99999 );
  4572. }
  4573. }
  4574. return 1;
  4575. }
  4576.  
  4577. stock IsValidWeapon( weaponid )
  4578. {
  4579. if ( weaponid > 0 && weaponid < 19 || weaponid > 21 && weaponid < 47 ) return 1;
  4580. return 0;
  4581. }
  4582.  
  4583. stock GetXPName()
  4584. {
  4585. new str[64];
  4586. switch(Map[XPType])
  4587. {
  4588. case 1: str = "~n~";
  4589. case 2: str = "Double XP";
  4590. case 3: str = "Triple XP";
  4591. case 4: str = "Quad XP";
  4592. }
  4593. return str;
  4594. }
  4595.  
  4596. stock NeedXP(playerid,xprequires)
  4597. {
  4598. if(pInfo[playerid][pXP] == xprequires) return 1;
  4599. return 1;
  4600. }
  4601.  
  4602. stock NeedKills(playerid,killrequires)
  4603. {
  4604. if(pInfo[playerid][pKills] == killrequires) return 1;
  4605. return 1;
  4606. }
  4607.  
  4608. CMD:testmykills(playerid,params[])
  4609. {
  4610. new myKill;
  4611. if(sscanf(params, "i", myKill)) return SendClientMessage(playerid,-1,""chat" /testmykills [set your own kills]");
  4612.  
  4613. pInfo[playerid][pKills] = myKill;
  4614. return 1;
  4615. }
  4616.  
  4617. stock CheckToLevelOrRankUp(killerid)
  4618. {
  4619. new str[256];
  4620.  
  4621. if(pInfo[killerid][pKills] == 10) { pInfo[killerid][pRank] = 1,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Private 1",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4622. if(pInfo[killerid][pKills] == 50) { pInfo[killerid][pRank] = 2,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Private I 2",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4623. if(pInfo[killerid][pKills] == 100) { pInfo[killerid][pRank] = 3,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Private II 3",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4624. if(pInfo[killerid][pKills] == 150) { pInfo[killerid][pRank] = 4,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Specialist 4",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4625. if(pInfo[killerid][pKills] == 200) { pInfo[killerid][pRank] = 5,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Corporal 5",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4626. if(pInfo[killerid][pKills] == 250) { pInfo[killerid][pRank] = 6,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Corporal I 6",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4627. if(pInfo[killerid][pKills] == 300) { pInfo[killerid][pRank] = 7,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Corporal II 7",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4628. if(pInfo[killerid][pKills] == 350) { pInfo[killerid][pRank] = 8,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sergeant 8",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4629. if(pInfo[killerid][pKills] == 400) { pInfo[killerid][pRank] = 9,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sergeant I 9",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4630. if(pInfo[killerid][pKills] == 450) { pInfo[killerid][pRank] = 10,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sergeant II 10",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4631. if(pInfo[killerid][pKills] == 500) { pInfo[killerid][pRank] = 11,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Commander 1 1",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4632. if(pInfo[killerid][pKills] == 550) { pInfo[killerid][pRank] = 12,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Commander I 12",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4633. if(pInfo[killerid][pKills] == 600) { pInfo[killerid][pRank] = 13,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Commander II 13",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4634. if(pInfo[killerid][pKills] == 650) { pInfo[killerid][pRank] = 14,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Killer 14",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4635. if(pInfo[killerid][pKills] == 700) { pInfo[killerid][pRank] = 15,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Killer I 15",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4636. if(pInfo[killerid][pKills] == 750) { pInfo[killerid][pRank] = 16,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Killer II 16",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4637. if(pInfo[killerid][pKills] == 800) { pInfo[killerid][pRank] = 17,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Major 1 7",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4638. if(pInfo[killerid][pKills] == 850) { pInfo[killerid][pRank] = 18,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Major I 18",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4639. if(pInfo[killerid][pKills] == 900) { pInfo[killerid][pRank] = 19,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Major II 19",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4640. if(pInfo[killerid][pKills] == 950) { pInfo[killerid][pRank] = 20,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Doctor 20",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4641. if(pInfo[killerid][pKills] == 1000) { pInfo[killerid][pRank] = 21,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Doctor I 21",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4642. if(pInfo[killerid][pKills] == 1500) { pInfo[killerid][pRank] = 22,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Doctor II 22",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4643. if(pInfo[killerid][pKills] == 2000) { pInfo[killerid][pRank] = 23,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Colonel 23",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4644. if(pInfo[killerid][pKills] == 2500) { pInfo[killerid][pRank] = 24,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Colonel I 24",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4645. if(pInfo[killerid][pKills] == 3000) { pInfo[killerid][pRank] = 25,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Colonel II 25",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4646. if(pInfo[killerid][pKills] == 3500) { pInfo[killerid][pRank] = 26,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sniper 26",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4647. if(pInfo[killerid][pKills] == 4000) { pInfo[killerid][pRank] = 27,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sniper I 27",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4648. if(pInfo[killerid][pKills] == 4500) { pInfo[killerid][pRank] = 28,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Sniper II 28",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4649. if(pInfo[killerid][pKills] == 5000) { pInfo[killerid][pRank] = 29,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Survivor 29",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4650. if(pInfo[killerid][pKills] == 5500) { pInfo[killerid][pRank] = 30,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Survivor I 30",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4651. if(pInfo[killerid][pKills] == 6000) { pInfo[killerid][pRank] = 31,format(str,sizeof(str),""chat""COL_PINK" %s has ranked up to rank Survivor II 31",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4652. if(pInfo[killerid][pKills] == 6500) { pInfo[killerid][pRank] = 32,format(str,sizeof(str),""chat""COL_PINK" %s has hit the max rank Final-list 32",PlayerName(killerid)),SendClientMessageToAll(-1,str); }
  4653. return 1;
  4654. }
  4655.  
  4656. function HideiKilled(playerid)
  4657. {
  4658. TextDrawHideForPlayer(playerid, iKilled[playerid]);
  4659. return 1;
  4660. }
  4661.  
  4662. function C4Explode(playerid)
  4663. {
  4664. new Float:X,Float:Y,Float:Z;
  4665. new Float:hp;
  4666. GetObjectPos(c4Obj[playerid],X,Y,Z);
  4667. foreach(Player,i)
  4668. {
  4669. if(IsPlayerInRangeOfPoint(i, 3.5,X,Y,Z))
  4670. {
  4671. if(team[i] == TEAM_ZOMBIE)
  4672. {
  4673. GetPlayerHealth(i,hp);
  4674. SetPlayerHealth(i,hp-35);
  4675. }
  4676. }
  4677. }
  4678. CreateExplosion(X,Y,Z,1,10.0);
  4679. DestroyObject(c4Obj[playerid]);
  4680. return 1;
  4681. }
  4682.  
  4683. stock CreateEvacMaps()
  4684. {
  4685. if(Map[EvacType] == 1)
  4686. {
  4687. CreateObject(19257,-1429.09,-981.20,193.10,3.28,0.00,5.47);
  4688. CreateObject(19257,-1395.39,-948.29,197.89,5.46,357.79,30.09);
  4689. CreateObject(19257,-1486.69,-954.70,191.69,13.12,1.12,280.79);
  4690. CreateObject(790,-1490.30,-948.90,188.10,0.00,0.00,41.56);
  4691. CreateObject(790,-1396.19,-955.59,197.00,0.00,0.00,196.38);
  4692. CreateObject(790,-1435.79,-984.19,189.60,0.00,0.00,127.25);
  4693. CreateObject(2060,-1433.19,-985.50,192.80,0.00,0.00,0.00);
  4694. CreateObject(2060,-1432.19,-985.40,192.69,0.00,0.00,0.00);
  4695. CreateObject(2060,-1431.09,-985.20,192.60,0.00,0.00,0.00);
  4696. CreateObject(2060,-1430.19,-984.90,192.50,0.00,0.00,0.00);
  4697. CreateObject(2060,-1429.19,-984.79,192.50,0.00,0.00,0.00);
  4698. CreateObject(2060,-1428.09,-984.70,192.50,0.00,0.00,0.00);
  4699. CreateObject(2060,-1427.09,-984.59,192.50,0.00,0.00,0.00);
  4700. CreateObject(2060,-1426.09,-984.50,192.39,0.00,0.00,0.00);
  4701. CreateObject(2060,-1425.00,-984.40,192.39,0.00,0.00,0.00);
  4702. CreateObject(2060,-1424.09,-984.29,192.39,0.00,0.00,0.00);
  4703. CreateObject(2060,-1424.30,-984.29,192.69,0.00,0.00,0.00);
  4704. CreateObject(2060,-1425.50,-984.50,192.69,0.00,0.00,0.00);
  4705. CreateObject(2060,-1426.50,-984.59,192.69,0.00,0.00,0.00);
  4706. CreateObject(2060,-1427.50,-984.59,192.69,0.00,0.00,0.00);
  4707. CreateObject(2060,-1428.40,-984.90,192.80,0.00,0.00,0.00);
  4708. CreateObject(2060,-1429.40,-985.00,192.80,0.00,0.00,0.00);
  4709. CreateObject(2060,-1430.50,-985.00,192.80,0.00,0.00,0.00);
  4710. CreateObject(2060,-1431.50,-985.29,192.89,0.00,0.00,0.00);
  4711. CreateObject(2060,-1432.50,-985.59,193.00,0.00,0.00,0.00);
  4712. CreateObject(2060,-1433.19,-985.29,193.10,0.00,0.00,0.00);
  4713. CreateObject(2060,-1431.90,-985.40,193.30,0.00,0.00,0.00);
  4714. CreateObject(2060,-1431.80,-985.00,193.19,0.00,0.00,0.00);
  4715. CreateObject(2060,-1430.90,-984.90,193.19,0.00,0.00,0.00);
  4716. CreateObject(2060,-1429.90,-984.79,193.19,0.00,0.00,0.00);
  4717. CreateObject(2060,-1428.90,-984.70,193.19,0.00,0.00,0.00);
  4718. CreateObject(2060,-1427.90,-984.59,193.19,0.00,0.00,0.00);
  4719. CreateObject(2060,-1427.00,-984.59,193.10,0.00,0.00,0.00);
  4720. CreateObject(2060,-1425.90,-984.50,193.10,0.00,0.00,0.00);
  4721. CreateObject(2060,-1424.80,-984.40,193.00,0.00,0.00,0.00);
  4722. CreateObject(2060,-1424.09,-984.29,193.00,0.00,0.00,0.00);
  4723. CreateObject(2060,-1433.09,-984.70,193.19,0.00,0.00,0.00);
  4724. CreateObject(2060,-1431.90,-984.40,193.19,0.00,0.00,0.00);
  4725. CreateObject(2060,-1430.69,-984.29,193.10,0.00,0.00,0.00);
  4726. CreateObject(2060,-1429.50,-984.50,193.50,0.00,0.00,0.00);
  4727. CreateObject(2060,-1428.50,-984.09,193.10,0.00,0.00,0.00);
  4728. CreateObject(2060,-1427.00,-984.40,193.39,0.00,0.00,0.00);
  4729. CreateObject(2060,-1425.80,-984.00,193.19,0.00,0.00,0.00);
  4730. CreateObject(2060,-1424.59,-983.79,193.19,0.00,0.00,0.00);
  4731. CreateObject(2060,-1427.19,-983.70,193.19,0.00,0.00,0.00);
  4732. CreateObject(2060,-1425.69,-983.09,193.30,0.00,0.00,0.00);
  4733. CreateObject(2060,-1424.50,-983.09,193.30,0.00,0.00,0.00);
  4734. CreateObject(2060,-1425.69,-983.59,193.19,0.00,0.00,0.00);
  4735. CreateObject(2060,-1432.09,-983.79,193.30,0.00,0.00,0.00);
  4736. CreateObject(2060,-1430.50,-983.79,193.30,0.00,0.00,0.00);
  4737. CreateObject(2060,-1429.30,-983.90,193.19,0.00,0.00,0.00);
  4738. CreateObject(2060,-1429.00,-983.50,194.39,0.00,0.00,5.47);
  4739. CreateObject(2060,-1394.30,-950.09,199.00,0.00,0.00,211.35);
  4740. CreateObject(2060,-1489.59,-953.09,191.89,0.00,0.00,284.11);
  4741. CreateObject(2060,-1489.40,-954.20,191.80,0.00,0.00,284.11);
  4742. CreateObject(2060,-1489.19,-955.20,191.80,0.00,0.00,284.11);
  4743. CreateObject(2060,-1489.00,-956.00,191.80,0.00,0.00,284.11);
  4744. CreateObject(2060,-1488.80,-957.09,191.80,0.00,0.00,284.11);
  4745. CreateObject(2060,-1489.80,-952.59,192.19,0.00,0.00,284.11);
  4746. CreateObject(2060,-1489.50,-953.59,192.19,0.00,0.00,284.11);
  4747. CreateObject(2060,-1489.30,-954.59,192.10,0.00,0.00,284.11);
  4748. CreateObject(2060,-1489.09,-955.70,192.10,0.00,0.00,284.11);
  4749. CreateObject(2060,-1488.90,-956.79,192.10,0.00,0.00,284.11);
  4750. CreateObject(2060,-1489.09,-955.09,192.60,0.00,0.00,284.11);
  4751. CreateObject(3884,-1395.19,-948.40,201.60,0.00,1.09,212.76);
  4752. CreateObject(3095,-1455.59,-922.40,200.50,0.00,358.90,269.99);
  4753. CreateObject(3885,-1454.69,-923.29,202.19,0.00,0.00,0.00);
  4754. CreateObject(3885,-1429.19,-981.40,197.00,4.37,0.00,0.00);
  4755. CreateObject(3885,-1487.19,-954.79,195.10,0.00,353.43,358.90);
  4756. CreateObject(3885,-1395.30,-948.40,201.80,5.47,1.09,359.89);
  4757. CreateObject(3884,-1454.30,-923.29,202.10,0.00,0.00,359.25);
  4758. CreateObject(3884,-1429.30,-981.29,196.80,0.00,0.00,182.98);
  4759. CreateObject(3884,-1487.00,-954.90,195.10,352.33,1.10,98.38);
  4760. CreateObject(3279,-1480.50,-961.20,192.30,358.90,356.71,92.34);
  4761. CreateObject(3279,-1382.09,-941.19,198.00,0.00,0.00,213.32);
  4762. CreateObject(3279,-1416.29,-975.59,194.19,358.90,356.70,92.41);
  4763. CreateObject(987,-1444.29,-983.50,192.50,0.00,0.00,0.00);
  4764. CreateObject(987,-1456.19,-983.59,192.50,0.00,0.00,0.00);
  4765. CreateObject(987,-1468.19,-983.59,192.60,0.00,0.00,0.00);
  4766. CreateObject(987,-1479.39,-979.59,192.60,0.00,0.00,340.25);
  4767. CreateObject(987,-1483.90,-968.40,191.10,0.00,0.00,293.06);
  4768. CreateObject(987,-1487.09,-958.19,191.10,0.00,0.00,288.67);
  4769. CreateObject(987,-1489.90,-939.79,191.69,0.00,0.00,277.72);
  4770. CreateObject(987,-1491.50,-928.09,191.69,0.00,0.00,277.71);
  4771. CreateObject(987,-1483.59,-918.69,194.50,1.08,6.56,230.32);
  4772. CreateObject(987,-1473.50,-913.50,197.69,1.08,6.56,208.31);
  4773. CreateObject(987,-1462.30,-912.20,200.60,359.99,359.99,187.59);
  4774. CreateObject(987,-1473.50,-913.50,200.60,1.08,6.56,208.31);
  4775. CreateObject(987,-1483.90,-919.09,199.19,1.08,6.56,230.32);
  4776. CreateObject(987,-1491.50,-928.09,198.00,0.00,0.00,277.71);
  4777. CreateObject(987,-1489.90,-939.79,198.00,0.00,0.00,277.72);
  4778. CreateObject(987,-1487.09,-958.20,196.80,0.00,0.00,288.67);
  4779. CreateObject(987,-1483.90,-968.40,196.69,0.00,0.00,293.06);
  4780. CreateObject(987,-1479.40,-979.59,196.69,0.00,0.00,340.25);
  4781. CreateObject(987,-1468.19,-983.59,196.60,0.00,0.00,0.00);
  4782. CreateObject(987,-1456.19,-983.59,196.60,0.00,0.00,0.00);
  4783. CreateObject(987,-1444.30,-983.50,196.60,0.00,0.00,0.00);
  4784. CreateObject(987,-1450.50,-910.59,200.60,359.98,359.98,187.59);
  4785. CreateObject(987,-1438.69,-909.09,200.39,359.98,359.98,187.59);
  4786. CreateObject(987,-1427.30,-909.20,196.39,359.98,359.98,180.42);
  4787. CreateObject(987,-1427.30,-909.20,200.10,359.98,359.98,180.41);
  4788. CreateObject(987,-1415.69,-909.20,194.50,359.98,359.98,180.41);
  4789. CreateObject(987,-1415.50,-909.09,200.10,359.98,359.98,180.41);
  4790. CreateObject(987,-1404.00,-909.09,190.69,359.98,359.98,180.41);
  4791. CreateObject(987,-1404.00,-909.09,195.89,359.98,359.98,180.41);
  4792. CreateObject(987,-1404.00,-909.09,200.10,359.98,359.98,180.41);
  4793. CreateObject(987,-1392.30,-909.00,189.00,359.98,359.98,180.41);
  4794. CreateObject(987,-1392.30,-909.00,194.00,359.98,359.98,180.41);
  4795. CreateObject(987,-1392.30,-909.00,200.00,359.98,359.98,180.41);
  4796. CreateObject(987,-1380.30,-908.90,186.10,359.98,359.98,180.41);
  4797. CreateObject(987,-1380.30,-908.90,192.39,359.98,359.98,180.41);
  4798. CreateObject(987,-1380.30,-908.90,197.10,359.98,359.98,180.41);
  4799. CreateObject(987,-1380.30,-908.90,200.00,359.98,359.98,180.41);
  4800. CreateObject(987,-1373.40,-918.40,186.10,359.98,359.98,125.45);
  4801. CreateObject(987,-1373.40,-918.40,191.19,359.97,359.97,125.44);
  4802. CreateObject(987,-1373.40,-918.40,196.39,359.97,359.97,125.44);
  4803. CreateObject(987,-1373.40,-918.40,200.00,359.97,359.97,125.44);
  4804. CreateObject(987,-1374.80,-930.09,190.50,359.97,5.45,83.73);
  4805. CreateObject(987,-1374.90,-929.70,195.00,359.97,2.16,83.73);
  4806. CreateObject(987,-1374.90,-929.70,200.50,359.97,2.16,83.72);
  4807. CreateObject(987,-1376.00,-941.59,194.19,359.97,5.44,83.73);
  4808. CreateObject(987,-1376.09,-941.20,199.10,359.97,3.25,83.73);
  4809. CreateObject(987,-1376.09,-941.20,201.19,359.97,3.25,83.72);
  4810. CreateObject(987,-1380.09,-952.20,197.39,357.78,358.87,69.37);
  4811. CreateObject(987,-1380.09,-952.20,201.00,357.78,358.87,69.37);
  4812. CreateObject(987,-1391.09,-979.00,191.80,357.78,358.87,37.37);
  4813. CreateObject(987,-1426.09,-981.50,192.50,0.00,0.00,0.00);
  4814. CreateObject(987,-1414.09,-981.50,192.00,0.00,0.00,0.00);
  4815. CreateObject(987,-1402.80,-981.40,192.00,0.00,0.00,12.04);
  4816. CreateObject(987,-1426.09,-981.50,196.39,0.00,0.00,0.00);
  4817. CreateObject(987,-1414.09,-981.50,196.39,0.00,0.00,0.00);
  4818. CreateObject(987,-1402.80,-981.40,196.39,0.00,0.00,12.04);
  4819. CreateObject(987,-1391.09,-979.00,196.39,357.78,358.86,37.37);
  4820. CreateObject(11488,-1437.40,-952.59,200.10,0.00,0.00,346.86);
  4821. CreateObject(2745,-1394.59,-949.70,198.39,0.00,0.00,29.67);
  4822. CreateObject(3265,-1380.19,-962.79,196.39,0.00,0.00,85.73);
  4823. CreateObject(3265,-1489.50,-958.20,193.60,0.00,0.00,277.62);
  4824. CreateObject(3265,-1423.89,-983.19,193.10,0.00,0.00,1.12);
  4825. CreateObject(2745,-1429.09,-982.90,193.69,0.00,0.00,14.33);
  4826. CreateObject(2745,-1488.80,-955.00,192.00,0.00,0.00,280.90);
  4827. CreateObject(2892,-1381.50,-966.59,196.10,4.36,4.39,359.66);
  4828. CreateObject(987,-1381.69,-962.00,196.60,357.78,358.87,80.32);
  4829. CreateObject(18850,-1425.80,-925.59,195.10,0.00,0.00,0.00);
  4830. AddStaticVehicleEx(432,-1434.40,-947.09,201.10,262.15,-1,-1,50);
  4831. AddStaticVehicleEx(433,-1445.09,-963.79,202.00,0.00,-1,-1,50);
  4832. AddStaticVehicleEx(433,-1450.69,-963.09,202.69,0.00,-1,-1,50);
  4833. CreateObject(2985,-1394.40,-950.09,198.30,0.00,0.00,305.03);
  4834. CreateObject(2985,-1488.80,-955.00,191.80,358.94,16.42,193.21);
  4835. CreateObject(2985,-1429.09,-983.19,193.60,358.94,16.42,276.75);
  4836. AddStaticVehicleEx(471,-1467.09,-944.40,203.69,262.10,-1,-1,50);
  4837. AddStaticVehicleEx(470,-1435.00,-958.70,201.10,270.90,-1,-1,50);
  4838. AddStaticVehicleEx(470,-1435.19,-953.40,201.10,270.90,-1,-1,50);
  4839. CreateObject(1596,-1425.40,-968.20,205.19,0.00,0.00,3.43);
  4840. CreateObject(1596,-1459.30,-926.59,203.00,0.00,0.00,329.33);
  4841. CreateObject(1596,-1437.00,-967.00,205.19,0.00,0.00,271.08);
  4842. AddStaticVehicleEx(548,-1427.90,-925.59,210.30,269.81,-1,-1,50);
  4843. CreateObject(3030,-1414.09,-937.09,207.39,0.00,0.00,0.00);
  4844. CreateObject(3030,-1427.19,-978.40,194.60,358.91,353.35,229.40);
  4845. CreateObject(3030,-1484.79,-951.69,193.39,0.00,0.00,52.66);
  4846. CreateObject(3030,-1395.29,-945.59,199.19,19.70,0.00,172.40);
  4847. CreateObject(3030,-1429.30,-966.70,202.69,358.91,353.35,284.36);
  4848. CreateObject(3763,-1471.90,-919.29,233.80,0.00,0.00,0.00);
  4849. CreateObject(3932,-1467.80,-945.09,204.69,0.00,0.00,353.43);
  4850. CreateObject(3932,-1460.00,-939.59,203.39,357.81,357.80,267.61);
  4851. CreateObject(3066,-1433.00,-963.59,200.89,358.83,1.09,269.87);
  4852. CreateObject(3046,-1424.69,-967.40,200.19,0.00,0.00,0.00);
  4853. CreateObject(3046,-1425.90,-967.40,200.19,0.00,0.00,0.00);
  4854. CreateObject(3046,-1427.00,-967.29,200.19,0.00,0.00,0.00);
  4855. CreateObject(3046,-1428.00,-967.29,200.30,0.00,0.00,0.00);
  4856. CreateObject(2973,-1436.09,-967.00,200.00,0.00,0.00,0.00);
  4857. CreateObject(2973,-1432.30,-966.79,200.00,0.00,0.00,0.00);
  4858. CreateObject(2973,-1429.30,-967.00,199.89,0.00,0.00,0.00);
  4859. CreateObject(930,-1470.00,-947.29,203.50,0.00,0.00,0.00);
  4860. CreateObject(930,-1468.69,-947.40,203.60,0.00,0.00,356.71);
  4861. CreateObject(2669,-1430.09,-932.59,201.80,0.00,0.00,0.00);
  4862. CreateObject(2068,-1433.59,-931.90,201.39,273.24,0.00,59.27);
  4863. CreateObject(2068,-1429.40,-927.59,201.39,273.24,0.00,4.26);
  4864. CreateObject(2068,-1423.69,-929.00,201.00,273.24,0.00,329.12);
  4865. CreateObject(2068,-1419.50,-932.29,201.00,273.24,0.00,320.35);
  4866. CreateObject(2068,-1431.40,-928.59,201.39,273.24,0.00,33.97);
  4867. CreateObject(16782,-1430.09,-930.29,201.89,0.00,0.00,268.82);
  4868. CreateObject(3877,-1399.00,-947.20,203.10,0.00,0.00,0.00);
  4869. CreateObject(3877,-1451.80,-926.09,202.80,0.00,0.00,0.00);
  4870. CreateObject(3877,-1484.09,-956.79,197.30,0.00,0.00,0.00);
  4871. CreateObject(3877,-1431.90,-978.70,198.30,0.00,0.00,0.00);
  4872. CreateObject(790,-1470.50,-976.50,191.60,0.00,0.00,127.25);
  4873. CreateObject(790,-1467.19,-981.79,191.60,0.00,0.00,127.25);
  4874. CreateObject(790,-1470.30,-956.09,190.69,0.00,0.00,231.63);
  4875. CreateObject(790,-1471.40,-936.59,190.69,0.00,0.00,269.00);
  4876. CreateObject(790,-1381.09,-922.90,192.50,0.00,358.90,272.22);
  4877. CreateObject(790,-1389.50,-933.00,192.50,0.00,358.90,206.26);
  4878. CreateObject(1554,-1466.09,-947.79,203.10,0.00,0.00,0.00);
  4879. CreateObject(1554,-1467.09,-947.59,203.19,0.00,0.00,0.00);
  4880. CreateObject(1554,-1467.80,-947.20,203.19,0.00,0.00,0.00);
  4881. CreateObject(1213,-1381.40,-963.59,196.60,0.00,0.00,0.00);
  4882. CreateObject(1213,-1381.50,-966.50,196.19,0.00,0.00,0.00);
  4883. CreateObject(1213,-1381.50,-968.29,196.00,0.00,0.00,0.00);
  4884. CreateObject(1213,-1381.50,-969.90,196.00,0.00,0.00,0.00);
  4885. CreateObject(5821,-1443.80,-928.59,203.19,0.00,0.00,358.90);
  4886. CreateObject(967,-1381.59,-971.00,195.60,0.00,0.00,0.00);
  4887. CreateObject(2985,-1381.19,-971.00,195.89,0.00,6.56,1.09);
  4888. CreateObject(2745,-1381.40,-971.00,196.19,0.00,0.00,94.52);
  4889. CreateObject(1250,-1381.90,-962.59,197.50,0.00,0.00,0.00);
  4890. CreateObject(1374,-1382.00,-963.29,197.89,0.00,0.00,182.48);
  4891. CreateObject(18762,-1382.09,-962.50,195.00,0.00,0.00,0.00);
  4892. CreateObject(17055,-1463.19,-961.59,202.60,13.13,1.12,330.07);
  4893. CreateObject(16662,-1418.09,-928.79,201.30,0.00,0.00,288.25);
  4894. CreateObject(18765,-1418.19,-929.29,198.69,270.11,180.00,133.86);
  4895. CreateObject(18765,-1425.30,-925.09,198.69,270.11,179.99,165.61);
  4896. CreateObject(18765,-1431.19,-923.40,198.69,270.00,175.62,160.18);
  4897. CreateObject(3807,-1424.90,-933.70,200.10,359.61,290.76,8.75);
  4898. CreateObject(3791,-1458.69,-937.70,202.30,0.00,8.75,0.00);
  4899. CreateObject(3791,-1458.80,-939.29,202.30,0.00,8.75,0.00);
  4900. CreateObject(3791,-1458.90,-940.90,202.30,0.00,8.75,0.00);
  4901. CreateObject(3795,-1461.59,-939.90,202.80,0.00,0.00,85.73);
  4902. CreateObject(18765,-1435.40,-926.90,198.69,270.11,179.99,246.85);
  4903. //Objects:209,Vehicles:7
  4904. }
  4905.  
  4906. if(Map[EvacType] == 2)
  4907. {
  4908. Map[AllowWater] = 1;
  4909. CreateObject(10794,3051.59,494.00,4.50,0.00,0.00,44.98);
  4910. CreateObject(10793,2999.39,441.50,29.60,0.00,0.00,44.99);
  4911. CreateObject(10795,3050.50,492.89,14.50,0.00,0.00,44.99);
  4912. CreateObject(1691,3018.39,504.29,0.69,0.00,274.30,330.28);
  4913. CreateObject(18762,3028.80,497.20,0.60,0.00,91.17,354.48);
  4914. CreateObject(18762,3030.00,499.60,0.60,0.00,91.16,310.61);
  4915. CreateObject(18762,3026.80,503.00,0.69,0.00,91.16,316.08);
  4916. CreateObject(18762,3024.19,497.79,0.60,0.00,88.97,351.49);
  4917. CreateObject(18762,3023.39,505.79,0.80,0.00,91.15,324.84);
  4918. CreateObject(18762,3019.69,498.89,0.60,0.00,91.17,339.45);
  4919. CreateObject(18762,3017.89,501.70,0.69,0.00,91.17,245.05);
  4920. CreateObject(18762,3020.00,505.79,0.80,0.00,91.17,240.16);
  4921. CreateObject(18765,3023.80,502.20,-4.69,0.01,88.98,56.17);
  4922. CreateObject(18762,3024.60,498.20,-0.30,0.00,91.17,341.64);
  4923. CreateObject(18762,3022.00,499.70,-0.20,0.00,91.17,326.14);
  4924. CreateObject(18762,3020.30,500.79,-0.20,0.00,91.17,326.14);
  4925. CreateObject(18762,3019.89,500.10,-0.20,0.00,91.17,326.14);
  4926. CreateObject(18762,3019.69,499.79,-0.20,0.00,91.17,340.37);
  4927. CreateObject(18762,3029.80,498.89,-0.20,0.00,91.17,314.10);
  4928. CreateObject(18762,3029.19,498.60,-0.20,0.00,91.17,314.09);
  4929. CreateObject(18762,3029.10,497.70,-0.20,0.00,91.17,345.85);
  4930. CreateObject(18762,3029.30,498.10,-0.20,0.00,91.17,339.28);
  4931. CreateObject(18762,3033.10,496.00,0.50,0.00,91.16,310.61);
  4932. CreateObject(18762,3033.30,496.70,0.50,0.00,91.17,354.47);
  4933. CreateObject(18762,3020.60,499.79,-0.20,0.00,91.17,326.14);
  4934. CreateObject(11245,3019.89,507.79,2.90,0.00,312.80,147.30);
  4935. CreateObject(2983,3022.19,504.10,0.80,318.43,2.92,229.23);
  4936. CreateObject(3350,3022.80,504.79,-0.40,0.00,0.00,47.22);
  4937. CreateObject(2985,3031.19,497.39,0.40,0.00,355.62,327.07);
  4938. CreateObject(2207,3021.89,503.10,0.30,0.00,0.00,46.13);
  4939. CreateObject(2985,3020.60,498.60,0.40,0.00,355.61,260.07);
  4940. CreateObject(2985,3025.19,504.60,0.50,0.00,355.61,48.50);
  4941. CreateObject(9831,3016.69,505.70,0.30,43.79,0.00,63.68);
  4942. CreateObject(18762,3031.30,502.00,0.60,0.00,91.16,46.12);
  4943. CreateObject(18762,3032.00,501.29,0.60,0.00,91.15,46.12);
  4944. CreateObject(18762,3032.69,500.70,0.60,0.00,91.15,46.12);
  4945. CreateObject(18850,3023.39,466.29,7.19,0.00,0.00,314.92);
  4946. AddStaticVehicleEx(548,3023.89,466.20,22.39,224.77,-1,-1,50);
  4947. CreateObject(3884,3103.10,546.00,20.39,0.00,0.00,25.75);
  4948. CreateObject(3277,3055.39,479.00,13.80,0.00,0.00,0.00);
  4949. CreateObject(3277,3103.60,546.40,20.50,0.00,0.00,156.13);
  4950. CreateObject(3884,3055.50,479.29,13.60,0.00,0.00,181.88);
  4951. CreateObject(3877,2999.10,463.89,28.79,0.00,0.00,45.03);
  4952. CreateObject(3877,3021.59,441.09,28.79,0.00,0.00,45.03);
  4953. CreateObject(3877,3098.39,547.90,20.50,0.00,0.00,45.03);
  4954. CreateObject(3877,3060.19,479.39,15.39,0.00,0.00,45.03);
  4955. CreateObject(3066,3080.19,500.29,14.80,0.00,0.00,314.96);
  4956. CreateObject(3066,3089.30,509.50,14.80,0.00,0.00,314.96);
  4957. CreateObject(3066,3097.80,517.79,14.80,0.00,0.00,314.96);
  4958. AddStaticVehicleEx(470,3041.89,496.00,14.89,43.94,-1,-1,50);
  4959. AddStaticVehicleEx(470,3049.60,488.39,14.89,43.93,-1,-1,50);
  4960. CreateObject(13489,3029.69,491.60,15.69,0.00,0.00,314.96);
  4961. CreateObject(8885,3114.60,539.90,17.20,0.00,0.00,57.22);
  4962. CreateObject(11237,3082.39,524.79,20.39,0.00,0.00,46.20);
  4963. CreateObject(3791,3044.30,465.50,14.19,0.00,0.00,0.00);
  4964. CreateObject(3791,3047.80,467.60,14.19,0.00,0.00,45.14);
  4965. CreateObject(3791,3046.50,468.79,14.19,0.00,0.00,45.14);
  4966. CreateObject(3791,3050.80,471.10,14.19,0.00,0.00,45.14);
  4967. CreateObject(3791,3049.50,472.10,14.19,0.00,0.00,45.14);
  4968. CreateObject(3791,3045.39,470.20,14.19,0.00,0.00,45.14);
  4969. CreateObject(3791,3048.19,473.29,14.19,0.00,0.00,45.14);
  4970. AddStaticVehicleEx(595,3003.89,494.09,0.00,174.11,-1,-1,50);
  4971. CreateObject(7981,3111.10,552.09,18.79,0.00,0.00,46.20);
  4972. CreateObject(3877,3105.19,541.50,20.60,0.00,0.00,45.03);
  4973. CreateObject(1682,3115.60,556.40,30.29,0.00,0.00,317.07);
  4974. CreateObject(2061,3108.00,562.70,14.10,0.00,0.00,0.00);
  4975. CreateObject(2061,3108.30,562.50,14.10,0.00,0.00,0.00);
  4976. CreateObject(2061,3108.50,562.29,14.10,0.00,0.00,0.00);
  4977. CreateObject(2061,3108.60,562.09,14.10,0.00,0.00,0.00);
  4978. CreateObject(2061,3108.89,562.00,14.10,0.00,0.00,0.00);
  4979. CreateObject(2061,3109.00,561.79,14.10,0.00,0.00,0.00);
  4980. CreateObject(2061,3109.19,561.59,14.10,0.00,0.00,0.00);
  4981. CreateObject(2061,3109.39,561.50,14.10,0.00,0.00,0.00);
  4982. CreateObject(2061,3109.50,561.29,14.10,0.00,0.00,0.00);
  4983. CreateObject(2061,3107.89,562.29,14.10,0.00,0.00,0.00);
  4984. CreateObject(2061,3108.10,562.09,14.10,0.00,0.00,0.00);
  4985. CreateObject(2061,3108.19,561.90,14.10,0.00,0.00,0.00);
  4986. CreateObject(2061,3108.50,561.79,14.10,0.00,0.00,0.00);
  4987. CreateObject(2061,3108.69,561.50,14.10,0.00,0.00,0.00);
  4988. CreateObject(2061,3108.89,561.29,14.10,0.00,0.00,0.00);
  4989. CreateObject(2061,3109.10,561.09,14.10,0.00,0.00,0.00);
  4990. CreateObject(1213,3017.10,500.00,0.89,0.00,0.00,0.00);
  4991. CreateObject(1691,3139.89,580.90,26.00,0.00,277.58,223.67);
  4992. CreateObject(3258,3115.80,561.29,21.89,0.00,82.33,42.81);
  4993. CreateObject(3258,3118.50,558.50,21.89,0.00,82.33,42.80);
  4994. CreateObject(16782,3011.60,452.79,23.50,0.00,0.00,47.33);
  4995. CreateObject(18683,3141.00,580.20,26.20,0.00,0.00,0.00);
  4996. CreateObject(18683,3138.80,583.00,26.20,0.00,0.00,0.00);
  4997. //Objects:84,Vehicles:4
  4998.  
  4999. }
  5000.  
  5001. if(Map[EvacType] == 3)
  5002. {
  5003. CreateObject(14548,257.00,2510.10,123.50,13.13,0.00,270.90);
  5004. CreateObject(16782,227.10,2512.80,123.09,0.00,0.00,0.00);
  5005. CreateObject(5156,252.30,2507.39,118.80,8.75,1.10,92.13);
  5006. CreateObject(3256,246.30,2488.30,117.59,0.00,281.89,0.00);
  5007. CreateObject(3256,247.89,2466.10,118.00,0.00,282.98,0.00);
  5008. CreateObject(3256,247.69,2442.50,118.00,0.00,282.98,0.00);
  5009. CreateObject(3256,245.10,2531.30,116.90,359.99,284.08,0.00);
  5010. CreateObject(3256,243.39,2554.39,116.90,0.00,281.89,0.00);
  5011. CreateObject(3256,241.50,2573.80,116.90,0.00,280.79,0.00);
  5012. CreateObject(2117,231.69,2514.00,121.40,0.00,0.00,0.00);
  5013. CreateObject(2117,233.69,2514.00,121.40,0.00,0.00,0.00);
  5014. CreateObject(1753,239.69,2513.89,121.50,0.00,0.00,0.00);
  5015. CreateObject(1753,242.89,2512.50,121.50,0.00,1.09,269.85);
  5016. CreateObject(15037,241.00,2506.50,121.90,0.00,0.00,94.52);
  5017. CreateObject(2063,261.20,2505.69,122.40,0.00,0.00,180.83);
  5018. CreateObject(2063,264.89,2505.80,122.40,0.00,0.00,180.82);
  5019. CreateObject(2063,268.70,2505.89,122.40,0.00,0.00,180.82);
  5020. CreateObject(2606,234.19,2514.39,122.40,0.00,0.00,0.00);
  5021. CreateObject(2616,227.19,2506.60,122.50,0.00,0.00,91.06);
  5022. CreateObject(2611,229.10,2514.30,122.69,6.56,358.89,0.12);
  5023. CreateObject(2053,231.39,2513.69,122.30,0.00,0.00,0.00);
  5024. CreateObject(2053,231.39,2514.10,122.30,0.00,0.00,0.00);
  5025. CreateObject(2053,231.60,2514.19,122.30,0.00,0.00,0.00);
  5026. CreateObject(2053,231.60,2514.00,122.30,0.00,0.00,0.00);
  5027. CreateObject(2053,231.60,2513.69,122.30,0.00,0.00,0.00);
  5028. CreateObject(2053,231.80,2513.69,122.30,0.00,0.00,0.00);
  5029. CreateObject(2053,231.80,2514.19,122.30,0.00,0.00,0.00);
  5030. CreateObject(2053,231.89,2514.00,122.30,0.00,0.00,0.00);
  5031. CreateObject(2202,229.80,2513.80,121.40,0.00,0.00,0.00);
  5032. CreateObject(1714,234.30,2512.80,121.40,0.00,0.00,225.90);
  5033. CreateObject(1714,237.10,2506.89,121.40,0.00,0.00,60.58);
  5034. CreateObject(2763,240.60,2511.89,121.90,0.00,0.00,0.00);
  5035. CreateObject(3383,232.50,2505.60,121.40,0.00,0.00,0.00);
  5036. CreateObject(11631,237.80,2506.10,122.69,0.00,0.00,180.90);
  5037. CreateObject(3111,233.60,2505.69,122.50,0.00,0.00,0.00);
  5038. CreateObject(3031,228.39,2505.60,123.00,0.00,0.00,47.22);
  5039. CreateObject(3017,230.80,2505.89,122.59,0.00,0.00,269.02);
  5040. CreateObject(2919,257.79,2506.19,122.19,0.00,0.00,0.00);
  5041. CreateObject(1808,236.30,2514.19,121.40,0.00,0.00,0.00);
  5042. CreateObject(2827,240.50,2512.10,122.30,0.00,0.00,0.00);
  5043. CreateObject(2683,240.89,2511.89,122.40,0.00,0.00,0.00);
  5044. CreateObject(2683,240.80,2511.60,122.40,0.00,0.00,0.00);
  5045. CreateObject(2683,240.39,2511.69,122.40,0.00,0.00,0.00);
  5046. CreateObject(3791,254.19,2506.39,122.00,0.00,0.00,0.00);
  5047. CreateObject(3791,250.89,2506.30,121.90,0.00,0.00,0.00);
  5048. CreateObject(3791,254.10,2507.80,122.00,0.00,0.00,0.00);
  5049. CreateObject(3791,271.89,2506.30,122.00,0.00,0.00,0.00);
  5050. CreateObject(2886,226.69,2510.89,123.09,0.00,0.00,0.00);
  5051. AddStaticVehicleEx(470,274.50,2513.50,122.59,272.98,-1,-1,50);
  5052. AddStaticVehicleEx(470,267.00,2513.10,122.59,270.79,-1,-1,50);
  5053. CreateObject(3066,252.50,2513.50,122.50,0.00,0.00,272.11);
  5054. CreateObject(3046,259.39,2513.89,121.90,0.00,0.00,0.00);
  5055. CreateObject(3046,260.39,2513.80,121.90,0.00,0.00,0.00);
  5056. CreateObject(3046,261.29,2513.80,121.90,0.00,0.00,0.00);
  5057. CreateObject(3046,262.20,2513.80,121.90,0.00,0.00,0.00);
  5058. CreateObject(3046,263.00,2514.00,121.90,0.00,0.00,0.00);
  5059. CreateObject(3013,260.60,2505.80,123.40,0.00,0.00,0.00);
  5060. CreateObject(3013,261.39,2505.69,123.30,0.00,0.00,0.00);
  5061. CreateObject(3013,262.00,2505.80,123.30,0.00,0.00,0.00);
  5062. CreateObject(3013,265.39,2506.00,123.00,0.00,0.00,0.00);
  5063. CreateObject(3013,264.50,2505.89,122.59,0.00,0.00,0.00);
  5064. CreateObject(3013,265.60,2505.89,122.19,0.00,0.00,0.00);
  5065. CreateObject(3013,269.10,2506.10,123.00,0.00,0.00,0.00);
  5066. CreateObject(3013,268.10,2505.89,123.30,0.00,0.00,0.00);
  5067. CreateObject(3013,268.00,2506.00,122.50,0.00,0.00,0.00);
  5068. CreateObject(2973,247.50,2506.10,121.50,0.00,0.00,0.00);
  5069. CreateObject(964,274.60,2506.19,121.50,0.00,0.00,0.00);
  5070. CreateObject(964,246.50,2513.89,121.50,0.00,0.00,0.00);
  5071. CreateObject(964,244.50,2513.89,121.50,0.00,0.00,0.00);
  5072. CreateObject(964,237.89,2513.69,121.50,0.00,0.00,0.00);
  5073. CreateObject(964,235.50,2505.69,121.40,0.00,0.00,0.00);
  5074. CreateObject(2041,262.10,2505.80,122.50,0.00,0.00,178.64);
  5075. CreateObject(1242,269.70,2506.00,122.00,0.00,0.00,0.00);
  5076. CreateObject(1242,268.89,2505.89,122.00,0.00,0.00,0.00);
  5077. CreateObject(1242,267.89,2505.89,122.00,0.00,0.00,0.00);
  5078. CreateObject(2035,269.10,2506.00,122.40,1.09,3.28,359.93);
  5079. CreateObject(2035,265.39,2505.80,122.40,1.08,1.09,359.97);
  5080. CreateObject(2035,260.60,2505.80,122.40,1.08,359.53,0.00);
  5081. CreateObject(2036,264.70,2505.89,123.30,0.00,0.00,0.00);
  5082. CreateObject(2044,264.79,2506.00,122.90,0.00,0.00,0.00);
  5083. CreateObject(2045,261.60,2505.80,122.80,0.00,0.00,269.88);
  5084. //Objects:79,Vehicles:2
  5085.  
  5086. }
  5087. return 1;
  5088. }
  5089.  
  5090. stock SpawnVars(playerid)
  5091. {
  5092. TextDrawHideForPlayer(playerid, ServerIntroOne[playerid]);
  5093. TextDrawHideForPlayer(playerid, ServerIntroTwo[playerid]);
  5094. ShowTextdrawsAfterConnect(playerid);
  5095.  
  5096. if(pInfo[playerid][pRank] >= 18)
  5097. {
  5098. SetPlayerAttachedObject(playerid,1,18978,2,0.065999,0.012999,0.000000,16.099998,81.499969,81.000000,1.000000,1.000000,1.000000);
  5099. }
  5100. return 1;
  5101. }
  5102.  
  5103. stock sendClassMessage(playerid)
  5104. {
  5105. new string[128];
  5106. if(team[playerid] == TEAM_HUMAN) format(string,sizeof(string),""chat""COL_YELLOW" You spawned as %s type /class to change your class",GetClassName(playerid));
  5107. if(team[playerid] == TEAM_ZOMBIE) format(string,sizeof(string),""chat""COL_YELLOW" You spawned as %s type /class to change your class",GetClassName(playerid));
  5108. SendClientMessage(playerid,-1,string);
  5109. return 1;
  5110. }
  5111.  
  5112. stock ShowTextdrawsAfterConnect(playerid)
  5113. {
  5114. TextDrawShowForPlayer(playerid, TimeLeft);
  5115. TextDrawShowForPlayer(playerid, UntilRescue);
  5116. TextDrawShowForPlayer(playerid, AliveInfo);
  5117. TextDrawShowForPlayer(playerid, remadeText);
  5118. TextDrawShowForPlayer(playerid, remadeText2);
  5119. TextDrawShowForPlayer(playerid, CurrentMap);
  5120. TextDrawShowForPlayer(playerid, XP);
  5121. TextDrawShowForPlayer(playerid, myXP[playerid]);
  5122. TextDrawShowForPlayer(playerid, EventText);
  5123. return 1;
  5124. }
  5125.  
  5126. stock hideTextdrawsAfterConnect(playerid)
  5127. {
  5128. TextDrawHideForPlayer(playerid, TimeLeft);
  5129. TextDrawHideForPlayer(playerid, UntilRescue);
  5130. TextDrawHideForPlayer(playerid, AliveInfo);
  5131. TextDrawHideForPlayer(playerid, remadeText);
  5132. TextDrawHideForPlayer(playerid, remadeText2);
  5133. TextDrawHideForPlayer(playerid, CurrentMap);
  5134. TextDrawHideForPlayer(playerid, XP);
  5135. TextDrawHideForPlayer(playerid, myXP[playerid]);
  5136. TextDrawHideForPlayer(playerid, EventText);
  5137. return 1;
  5138. }
  5139.  
  5140. stock GetClassName(playerid)
  5141. {
  5142. new classname[64];
  5143. if(team[playerid] == TEAM_HUMAN)
  5144. {
  5145. switch(pInfo[playerid][pHumanClass])
  5146. {
  5147. case CIVILIAN: classname = "Civilian";
  5148. case POLICEMAN: classname = "Police man";
  5149. case MEDIC: classname = "Medic";
  5150. case SCOUT: classname = "Scout";
  5151. case HEAVYMEDIC: classname = "Heavy Medic";
  5152. case FARMER: classname = "Farmer";
  5153. case ENGINEER: classname = "Engineer";
  5154. case SWAT: classname = "S.W.A.T";
  5155. case HEAVYSHOTGUN: classname = "Heavy Shoutgun";
  5156. case ADVANCEDMEDIC: classname = "Advanced Medic";
  5157. case ADVANCEDENGINEER: classname = "Advanced Engineer";
  5158. case FEDERALAGENT: classname = "Federal Agent";
  5159. case KICKBACK: classname = "Kick Back";
  5160. case ADVANCEDSCOUT: classname = "Advanced Scout";
  5161. case ASSASSIN: classname = "Assassin";
  5162. case VIPENGINEER: classname = "V.I.P Engineer";
  5163. case VIPMEDIC: classname = "V.I.P Medic";
  5164. case VIPSCOUT: classname = "V.I.P Scout";
  5165. case E_ENGINEER: classname = "Experienced Engineer";
  5166. case DOCTOR: classname = "Doctor";
  5167. }
  5168. }
  5169.  
  5170. if(team[playerid] == TEAM_ZOMBIE)
  5171. {
  5172. switch(pInfo[playerid][pZombieClass])
  5173. {
  5174. case STANDARDZOMBIE: classname = "Standard Zombie";
  5175. case MUTATEDZOMBIE: classname = "Mutated Zombie";
  5176. case FASTZOMBIE: classname = "Fast Zombie";
  5177. case REAPERZOMBIE: classname = "Reaper Zombie";
  5178. case WITCHZOMBIE: classname = "Witch Zombie";
  5179. case BOOMERZOMBIE: classname = "Boomer Zombie";
  5180. case STOMPERZOMBIE: classname = "Stomper Zombie";
  5181. case SCREAMERZOMBIE: classname = "Screamer Zombie";
  5182. case ADVANCEDMUTATED: classname = "Advanced Mutated";
  5183. case ADVANCEDSCREAMER: classname = "Advanced Screamer";
  5184. case FLESHEATER: classname = "Flesh Eater";
  5185. case ADVANCEDWITCH: classname = "Advanced Witch";
  5186. case ADVANCEDBOOMER: classname = "Advanced Boomer";
  5187. }
  5188. }
  5189. return classname;
  5190. }
  5191.  
  5192. stock GetAdminName(playerid)
  5193. {
  5194. new adminname[128];
  5195. switch(pInfo[playerid][pAdminLevel])
  5196. {
  5197. case 0: adminname = "Not Admin";
  5198. case 1: adminname = "Trial Moderator";
  5199. case 2: adminname = "Moderator";
  5200. case 3: adminname = "Admin";
  5201. case 4: adminname = "Management";
  5202. case 5: adminname = "Head Admin";
  5203. case 6: adminname = "Co-Owner";
  5204. case 7: adminname = "Owner";
  5205. }
  5206. return adminname;
  5207. }
  5208.  
  5209. stock escstring(stri[])
  5210. {
  5211. new escstr[200];
  5212. mysql_real_escape_string(stri, escstr);
  5213. return escstr;
  5214. }
  5215.  
  5216. function SPS_Reset_PVars()
  5217. {
  5218. for(new i=0; i < MAX_PLAYERS; i++)
  5219. {
  5220. if(GetPVarType(i, "SPS Muted") != PLAYER_VARTYPE_NONE) {
  5221. SetPVarInt(i, "SPS Muted", 0);
  5222. }
  5223. if(GetPVarType(i, "SPS Messages Sent") != PLAYER_VARTYPE_NONE) {
  5224. SetPVarInt(i, "SPS Messages Sent", 0);
  5225. }
  5226. if(GetPVarType(i, "SPS Spam Warnings") != PLAYER_VARTYPE_NONE) {
  5227. SetPVarInt(i, "SPS Spam Warnings", 0);
  5228. }
  5229. }
  5230. return 1;
  5231. }
  5232.  
  5233. function SPS_Remove_Messages_Limit(playerid)
  5234. {
  5235. if(GetPVarInt(playerid, "SPS Spam Warnings") == 1)
  5236. {
  5237. new string[128], pName[MAX_PLAYER_NAME];
  5238. GetPlayerName(playerid, pName, sizeof(pName));
  5239.  
  5240. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" Player %s has been muted for %i minutes because of flooding the chat.", pName, PLAYER_MUTE_TIME_MINUTES);
  5241. for(new i=0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i) && i != playerid) SendClientMessage(i, -1, string);
  5242.  
  5243. format(string, sizeof(string), ""chat""COL_LIGHTBLUE" You have been muted for %i minutes because of flooding the chat.", PLAYER_MUTE_TIME_MINUTES);
  5244. SendClientMessage(playerid, -1, string);
  5245.  
  5246. SetTimerEx("SPS_Unmute_Player", (PLAYER_MUTE_TIME_MINUTES * 60000), 0, "i", playerid);
  5247. SetPVarInt(playerid, "SPS Muted", 1);
  5248.  
  5249. CallRemoteFunction("OnPlayerGetMuted", "i", playerid);
  5250. }
  5251. SetPVarInt(playerid, "SPS Messages Sent", 0);
  5252. SetPVarInt(playerid, "SPS Spam Warnings", 0);
  5253. return 1;
  5254. }
  5255.  
  5256. function SPS_Unmute_Player(playerid)
  5257. {
  5258. SendClientMessage(playerid, -1, ""chat""COL_LIGHTBLUE" You have been automatically unmuted.");
  5259. SetPVarInt(playerid, "SPS Muted", 0);
  5260. return 1;
  5261. }
  5262.  
  5263. stock ShowCoinDialog(playerid)
  5264. {
  5265. new str[64];
  5266. ResetCoinVars(playerid);
  5267. format(str,sizeof(str),""COL_RED"You have %i coins",pInfo[playerid][pCoins]);
  5268. if(team[playerid] == TEAM_HUMAN)
  5269. {
  5270. ShowPlayerDialog(playerid,DIALOG_COINS,DIALOG_STYLE_LIST,str,"Enable Kick Back (45 Coins)\nMore Shotgun Damage (40 Coins)\nMore Deagle Damage (50 Coins)\nMore MP5 Damage (30 Coins)\nTry out Federal Agent Class (25 Coins)\nS.W.A.T Armour Object (30 Coins)\nVip Level Two Demo (800 Coins)","Select","No, Play");
  5271. }
  5272. return 1;
  5273. }
  5274.  
  5275. stock DoctorShield()
  5276. {
  5277. new Float:X,Float:Y,Float:Z,Float:hp,str[128];
  5278. GetObjectPos(DocShield,X,Y,Z);
  5279. foreach(Player,i)
  5280. {
  5281. if(IsPlayerInRangeOfPoint(i,4.5,X,Y,Z))
  5282. {
  5283. if(team[i] == TEAM_HUMAN)
  5284. {
  5285. GetPlayerHealth(i,hp);
  5286. if(hp < 80)
  5287. {
  5288. SetPlayerHealth(i,hp+3.5);
  5289. format(str,sizeof(str),"~n~~n~~n~~n~~g~GETTING HEALED BY DOCTOR SHIELD~w~ (NEW HP: %.2f HP)",hp);
  5290. GameTextForPlayer(i,str,1000,5);
  5291. }
  5292. else
  5293. {
  5294. GameTextForPlayer(i,"~n~~n~~n~~n~~r~YOU HAVE ENOUGH HP TO SURVIVE",1000,5);
  5295. }
  5296. }
  5297. }
  5298. }
  5299. return 1;
  5300. }
  5301.  
  5302. stock LoadStaticObjectsFromFile(filename[])
  5303. {
  5304. new File:file_ptr, line[256], modelid, Float:SpawnX, Float:SpawnY, Float:SpawnZ, Float:SpawnRotX, Float:SpawnRotY, Float:SpawnRotZ, objects_loaded;
  5305. file_ptr = fopen(filename, io_read);
  5306. if(!file_ptr) return printf("ERROR! Failed To Load Objects From The File %s (File Doesn't Exist In Scriptfiles Directory)!", filename);
  5307. while(fread(file_ptr, line) > 0)
  5308. {
  5309. sscanf(line, "dffffff", modelid, SpawnX, SpawnY, SpawnZ, SpawnRotX, SpawnRotY, SpawnRotZ);
  5310. CreateObject(modelid, SpawnX, SpawnY, SpawnZ, SpawnRotX, SpawnRotY, SpawnRotZ);
  5311. objects_loaded++;
  5312. }
  5313. fclose(file_ptr);
  5314. printf("Loaded %d objects from: %s", objects_loaded, filename);
  5315. return objects_loaded;
  5316. }
  5317.  
  5318. stock LoadStaticVehiclesFromFile(const filename[])
  5319. {
  5320. new File:file_ptr;
  5321. new line[256];
  5322. new var_from_line[64];
  5323. new vehicletype;
  5324. new Float:SpawnX;
  5325. new Float:SpawnY;
  5326. new Float:SpawnZ;
  5327. new Float:SpawnRot;
  5328. new Color1, Color2;
  5329. new index;
  5330. new vehicles_loaded;
  5331.  
  5332. file_ptr = fopen(filename,filemode:io_read);
  5333. if(!file_ptr) return 0;
  5334.  
  5335. vehicles_loaded = 0;
  5336.  
  5337. while(fread(file_ptr,line,256) > 0)
  5338. {
  5339. index = 0;
  5340. index = token_by_delim(line,var_from_line,',',index);
  5341. if(index == (-1)) continue;
  5342. vehicletype = strval(var_from_line);
  5343. if(vehicletype < 400 || vehicletype > 611) continue;
  5344. index = token_by_delim(line,var_from_line,',',index+1);
  5345. if(index == (-1)) continue;
  5346. SpawnX = floatstr(var_from_line);
  5347.  
  5348. index = token_by_delim(line,var_from_line,',',index+1);
  5349. if(index == (-1)) continue;
  5350. SpawnY = floatstr(var_from_line);
  5351.  
  5352. index = token_by_delim(line,var_from_line,',',index+1);
  5353. if(index == (-1)) continue;
  5354. SpawnZ = floatstr(var_from_line);
  5355.  
  5356. index = token_by_delim(line,var_from_line,',',index+1);
  5357. if(index == (-1)) continue;
  5358. SpawnRot = floatstr(var_from_line);
  5359. index = token_by_delim(line,var_from_line,',',index+1);
  5360. if(index == (-1)) continue;
  5361. Color1 = strval(var_from_line);
  5362.  
  5363. index = token_by_delim(line,var_from_line,';',index+1);
  5364. Color2 = strval(var_from_line);
  5365.  
  5366. CreateVehicle(vehicletype,SpawnX,SpawnY,SpawnZ+1,SpawnRot,Color1,Color2,15);
  5367.  
  5368. // AddStaticVehicle(vehicletype,SpawnX,SpawnY,SpawnZ+1,SpawnRot,Color1,Color2);
  5369. vehicles_loaded++;
  5370. }
  5371. fclose(file_ptr);
  5372. printf("Loaded %d vehicles from: %s",vehicles_loaded,filename);
  5373. return vehicles_loaded;
  5374. }
  5375.  
  5376. stock token_by_delim(const string[], return_str[], delim, start_index)
  5377. {
  5378. new x=0;
  5379. while(string[start_index] != EOS && string[start_index] != delim) {
  5380. return_str[x] = string[start_index];
  5381. x++;
  5382. start_index++;
  5383. }
  5384. return_str[x] = EOS;
  5385. if(string[start_index] == EOS) start_index = (-1);
  5386. return start_index;
  5387. }
Add Comment
Please, Sign In to add comment