Advertisement
bgtracker

Team Wars by ZackBoolaro

Dec 9th, 2012
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 75.76 KB | None | 0 0
  1. /*
  2. Credits:
  3. All credits for the include files are going to their respectful owners.
  4.  
  5. Scripting: Me(ZackBoolaro)
  6. Mapping: Me(ZackBoolaro)
  7. Testing: Me(ZackBoolaro)
  8. */
  9.  
  10. /*
  11. TESTED FOR BUGS
  12. BUG RESULTS: NO BUGS !!!
  13. */
  14. #include <a_samp>
  15. #include <zcmd>
  16. #include <streamer>
  17. #include <sscanf2>
  18. #include <YSI/y_ini>
  19. #include <foreach>
  20.  
  21. #define version "v1.1.059" /* Change whenever you compile it !
  22. The last three numbers are the times that you have compiled the script) */
  23.  
  24. #undef MAX_PLAYERS //Undefining the max players set in config.cfg so we can define them below
  25. #define MAX_PLAYERS 500 //Defining the max player able to login(play) to(on) the server
  26.  
  27. //Variables for the spectating system
  28. new String[128], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
  29. new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
  30.  
  31. //Spawn Protection
  32. forward SpawnProtection(playerid);
  33.  
  34. //Textdraws
  35. new Text:Textdraw0;
  36. new Text:Textdraw1;
  37. new Text:Textdraw2;
  38.  
  39. //Drive by system
  40. new uberhaxeddbweps[] =
  41.     {24, 25, 26};
  42.  
  43. new smgs[] =
  44.     {29, 28, 32};
  45.  
  46. //Register System Dialogs
  47. #define DIALOG_REGISTER 1
  48. #define DIALOG_LOGIN 2
  49. #define DIALOG_SUCCESS_1 3
  50. #define DIALOG_SUCCESS_2 4
  51.  
  52. //Colors
  53. #define COL GREEN2         "{33CC00}"
  54. #define COL_WHITE          "{FFFFFF}"
  55. #define COL_BLUE2          "{00AEFF}"
  56. #define COL_YELLOW         "{FFF600}"
  57. #define COL_LIME           "{BFFF00}"
  58. #define COL_KRED           "{940000}"
  59. #define COL_GREEN2         "{33CC00}"
  60.  
  61. #define COLOR_LIGHTBLUE 0x33CCFFAA
  62. #define COLOR_SYSTEM 0xEFEFF7AA
  63. #define COLOR_GREEN 0x33AA33AA
  64. #define COLOR_RED 0xAA3333AA
  65. #define COLOR_BRIGHTRED 0xFF0000AA
  66. #define COLOR_YELLOW 0xFFFF00AA
  67. #define COLOR_PINK 0xFF66FFAA
  68. #define COLOR_BLUE 0x3A47DEFF
  69. #define COLOR_TAN 0xBDB76BAA
  70. #define COLOR_PURPLE 0x800080AA
  71. #define COLOR_WHITE 0xFFFFFFAA
  72. #define COLOR_LIGHTBLUE 0x33CCFFAA
  73. #define COLOR_ORANGE 0xFF9900AA
  74. #define COLOR_INDIGO 0x4B00B0AA
  75. #define COLOR_BLACK 0x00000000
  76. #define COLOR_DARKGREY 0x696969FF
  77. #define COLOR_LIME 0x88AA62FF
  78. #define COLOR_FADE1 0xFFFFFFFF
  79. #define COLOR_FADE2 0xC8C8C8C8
  80. #define COLOR_FADE3 0xAAAAAAAA
  81. #define COLOR_FADE4 0x8C8C8C8C
  82. #define COLOR_FADE5 0x6E6E6E6E
  83. #define COLOR_GREY 0xB4B5B7FF
  84.  
  85. new pTeam[MAX_PLAYERS];
  86.  
  87. #define team_lspd 1
  88. #define team_balla 2
  89. #define team_groove 3
  90. #define team_civ 4
  91. #define team_aztecas 5
  92. #define team_vagos 6
  93. #define team_army 7
  94. #define team_mafia 8
  95.  
  96. #define INI_Exists(%0)  fexist(%0)
  97.  
  98. #define DIALOG_REGISTER 1
  99. #define DIALOG_LOGIN    2
  100.  
  101. #define USER_FILE       "BigFlashGaming/Registered/%s.ini"
  102.  
  103. //"Forwards"
  104. forward ScoreUpdate();
  105. forward PayDay(playerid);
  106. forward PlayerPlayMusic(playerid);
  107. forward StopMusic();
  108. forward GetVehicleModelIDFromName(vname[]);
  109.  
  110. enum pInfo
  111. {
  112.     pPassword[129],
  113.     pKills,
  114.     pDeaths,
  115.     pAdmin,
  116.     pMoney,
  117.     pScore,
  118.     pVIP,
  119.     pOnline,
  120.     pLevel,
  121.     pExp,
  122.     pAllowed_To_Use,
  123.     pDM, //New DM arena system
  124.     bool:pCanSpawnVehicle,
  125.     pSpawnVehicle
  126. }
  127. new PlayerInfo[MAX_PLAYERS][pInfo];
  128. new  Float:pX, Float:pY, Float:pZ, Float:pAngle;
  129. native WP_Hash(buffer[], len, const str[]);
  130. forward LoadUserData(playerid, name[], value[]);
  131.  
  132. new ScoreOld;
  133. new levelexp = 1;
  134.  
  135. new VehicleNames[212][] = {
  136. {"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
  137. {"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
  138. {"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
  139. {"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
  140. {"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
  141. {"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
  142. {"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
  143. {"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
  144. {"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
  145. {"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
  146. {"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
  147. {"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
  148. {"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
  149. {"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
  150. {"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
  151. {"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
  152. {"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
  153. {"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
  154. {"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
  155. {"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
  156. {"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
  157. {"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
  158. {"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
  159. {"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
  160. {"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
  161. {"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
  162. {"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
  163. {"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
  164. {"Utility Trailer"}};
  165.  
  166. public LoadUserData(playerid, name[], value[])
  167. {
  168.     INI_String("Password", PlayerInfo[playerid][pPassword], 129);
  169.     INI_Int("Admin", PlayerInfo[playerid][pAdmin]);
  170.     INI_Int("VIP", PlayerInfo[playerid][pVIP]);
  171.     INI_Int("Money", PlayerInfo[playerid][pMoney]);
  172.     INI_Int("Score", PlayerInfo[playerid][pScore]);
  173.     INI_Int("Kills", PlayerInfo[playerid][pKills]);
  174.     INI_Int("Deaths", PlayerInfo[playerid][pDeaths]);
  175.     INI_Int("Online", PlayerInfo[playerid][pOnline]);
  176.     INI_Int("Level",PlayerInfo[playerid][pLevel]);
  177.     INI_Int("Exp",PlayerInfo[playerid][pExp]);
  178.     INI_Int("WRestricted",PlayerInfo[playerid][pAllowed_To_Use]);
  179.     INI_Int("IsInDMArena",PlayerInfo[playerid][pDM]);
  180.     INI_Int("SpawnVehicle",PlayerInfo[playerid][pSpawnVehicle]);
  181.     return 1;
  182. }
  183.  
  184. OnPlayerRegister(playerid, password[])
  185. {
  186.     new
  187.         hashPassword[129],
  188.         uFile[35];
  189.  
  190.     format(uFile, 35, USER_FILE, GetName(playerid));
  191.  
  192.     new
  193.         INI:playerFile = INI_Open(uFile);
  194.  
  195.     WP_Hash(hashPassword, 129, password);
  196.  
  197.     INI_WriteString(playerFile, "Password", hashPassword);
  198.     INI_WriteInt(playerFile, "Admin", 0);
  199.     INI_WriteInt(playerFile, "VIP", 0);
  200.     INI_WriteInt(playerFile, "Money", 2000);
  201.     INI_WriteInt(playerFile, "Score", 0);
  202.     INI_WriteInt(playerFile, "Kills", 0);
  203.     INI_WriteInt(playerFile, "Deaths", 0);
  204.     INI_WriteInt(playerFile, "Online", 0);
  205.     INI_WriteInt(playerFile, "Level", 0);
  206.     INI_WriteInt(playerFile, "Exp", 0);
  207.     INI_WriteInt(playerFile, "WRestricted", 0);
  208.     INI_WriteInt(playerFile, "IsInDMArena", 0);
  209.     INI_WriteInt(playerFile, "SpawnVehicle", 0);
  210.  
  211.     INI_Close(playerFile);
  212.  
  213.     SetPVarInt(playerid, "Registered", 1);
  214.     SetPVarInt(playerid, "Logged", 1);
  215.     return 1;
  216. }
  217.  
  218. OnPlayerLogin(playerid, password[])
  219. {
  220.     new
  221.         hashPassword[129],
  222.         uFile[35];
  223.  
  224.     format(uFile, 35, USER_FILE, GetName(playerid));
  225.     INI_ParseFile(uFile, "LoadUserData", .bExtra = true, .extra = playerid);
  226.  
  227.     WP_Hash(hashPassword, 129, password);
  228.  
  229.     if(strcmp(PlayerInfo[playerid][pPassword], hashPassword, true))
  230.     {
  231.       SetPVarInt(playerid, "Logged", 1);
  232.     }
  233.     return 1;
  234. }
  235.  
  236. OnPlayerLogout(playerid)
  237. {
  238.     new
  239.         uFile[35];
  240.  
  241.     format(uFile, 35, USER_FILE, GetName(playerid));
  242.  
  243.     new
  244.     INI:playerFile = INI_Open(uFile);
  245.     INI_WriteInt(playerFile, "Admin", PlayerInfo[playerid][pAdmin]);
  246.     INI_WriteInt(playerFile,"VIP", PlayerInfo[playerid][pVIP]);
  247.     INI_WriteInt(playerFile,"Money", GetPlayerMoney(playerid));
  248.     INI_WriteInt(playerFile,"Score", GetPlayerScore(playerid));
  249.     INI_WriteInt(playerFile,"Kills", PlayerInfo[playerid][pKills]);
  250.     INI_WriteInt(playerFile,"Deaths", PlayerInfo[playerid][pDeaths]);
  251.     INI_WriteInt(playerFile,"Online", PlayerInfo[playerid][pOnline]);
  252.     INI_WriteInt(playerFile,"Level",PlayerInfo[playerid][pLevel]);
  253.     INI_WriteInt(playerFile,"Exp",PlayerInfo[playerid][pExp]);
  254.     INI_WriteInt(playerFile,"WRestricted",PlayerInfo[playerid][pAllowed_To_Use]);
  255.     INI_WriteInt(playerFile,"IsInDMArena",PlayerInfo[playerid][pDM]);
  256.     INI_WriteInt(playerFile,"SpawnVehicle",PlayerInfo[playerid][pSpawnVehicle]);
  257.  
  258.     INI_Close(playerFile);
  259.     return 1;
  260. }
  261.  
  262. forward Online();
  263. public Online()
  264. {
  265.     foreach (Player, i)
  266.     {
  267.         PlayerInfo[i][pOnline] += 1;
  268.     }
  269.     return 1;
  270. }
  271.  
  272. stock GetName(playerid)
  273. {
  274.     new
  275.         pName[MAX_PLAYER_NAME];
  276.  
  277.     GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  278.     return pName;
  279. }
  280.  
  281.  
  282.  
  283. main()
  284. {
  285.     print("\n----------------------------------");
  286.     print("______ Team Wars by ZackBoolaro(Zack_Martines) ______");
  287.     print("----------------------------------\n");
  288. }
  289.  
  290. public OnGameModeInit()
  291. {
  292.     SetGameModeText("TeamWars V1");
  293.     UsePlayerPedAnims();
  294.     AddPlayerClass(188,2342.3667,-1410.1563,23.8190,356.0515,27,10000,0,0,0,0);
  295.     AddStaticVehicle(412,2708.3896,-1078.7310,69.2530,269.9885,29,8); // aztecas car 1
  296.     AddStaticVehicle(412,2700.3889,-1078.7593,69.1932,270.1381,37,8); // aztecas car 2
  297.     AddStaticVehicle(412,2692.4985,-1078.8114,69.1412,270.3337,10,8); // aztecas car 3
  298.     AddStaticVehicle(412,2684.4832,-1078.7067,69.1333,270.3390,25,8); // aztecas car 4
  299.     AddStaticVehicle(412,2676.5527,-1078.8163,69.1358,270.4381,29,8); // aztecas car 5
  300.     AddStaticVehicle(412,2668.6731,-1078.6996,69.2390,269.4294,37,8); // aztecas car 6
  301.     AddStaticVehicle(412,2660.8250,-1078.6937,69.3908,270.4018,10,8); // aztecas car 7
  302.     AddStaticVehicle(492,2508.0024,-1671.7793,13.1602,167.7555,24,55); // groove car 1
  303.     AddStaticVehicle(492,2502.8662,-1680.0143,13.1579,129.3550,49,59); // groove car 2
  304.     AddStaticVehicle(492,2492.1992,-1682.8428,13.1192,89.7918,71,107); // groove car 3
  305.     AddStaticVehicle(492,2480.9858,-1682.2529,13.1136,78.4462,77,26); // groove car 4
  306.     AddStaticVehicle(492,2479.6367,-1655.2382,13.1008,270.0910,24,55); // groove car 5
  307.     AddStaticVehicle(492,2498.2615,-1655.6814,13.1767,258.8107,49,59); // groove car 6
  308.     AddStaticVehicle(517,2348.2312,-1398.9740,23.7538,359.7301,51,72); // balla car 1
  309.     AddStaticVehicle(517,2348.2405,-1406.7755,23.7559,359.7607,55,84); // balla car 2
  310.     AddStaticVehicle(517,2348.0752,-1414.5280,23.7611,358.5140,36,36); // balla car 3
  311.     AddStaticVehicle(517,2348.0347,-1421.9746,23.7646,359.1602,43,41); // balla car 4
  312.     AddStaticVehicle(517,2348.1343,-1429.8129,23.7647,0.4395,51,72); // balla car 5
  313.     AddStaticVehicle(517,2348.1306,-1437.8583,23.7647,359.1113,55,84); // balla car 6
  314.     AddStaticVehicle(576,2359.2971,-1162.4626,27.1860,269.6276,75,96); // vagos car 1
  315.     AddStaticVehicle(576,2352.4233,-1162.3909,27.0320,269.3164,79,1); // vagos car 2
  316.     AddStaticVehicle(576,2345.7139,-1162.3087,26.8795,269.3735,67,1); // vagos car 3
  317.     AddStaticVehicle(576,2339.2646,-1162.3069,26.7320,269.5419,72,1); // vagos car 4
  318.     AddStaticVehicle(576,2332.5952,-1162.3176,26.6006,269.4251,75,96); // vagos car 5
  319.     AddStaticVehicle(576,2325.9224,-1162.0173,26.5887,264.3307,79,1); // vagos car 6
  320.     AddStaticVehicle(596,1536.3380,-1678.5457,13.1041,359.3814,0,1); // cop car 1
  321.     AddStaticVehicle(596,1536.3397,-1672.6353,13.1068,359.6864,0,1); // cop car 2
  322.     AddStaticVehicle(596,1536.3688,-1666.5757,13.1032,359.6729,0,1); // cop car 3
  323.     AddStaticVehicle(596,1523.7937,-1684.2811,13.1828,359.7524,0,1); // cop car 4
  324.     AddStaticVehicle(596,1523.7949,-1671.0313,13.1815,1.6419,0,1); // cop car 5
  325.     AddStaticVehicle(596,1523.8750,-1677.5562,13.1910,359.5335,0,1); // cop car 6
  326.     CreateObject(12814,586.90002441,-3097.80004883,53.50000000,0.00000000,0.00000000,0.00000000); //object(cuntyeland04) (1)
  327.     CreateObject(987,601.70001221,-3073.10009766,53.50000000,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (2)
  328.     CreateObject(987,589.70001221,-3073.00000000,53.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (3)
  329.     CreateObject(987,583.90002441,-3073.00000000,53.50000000,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (4)
  330.     CreateObject(987,572.09997559,-3072.80004883,53.50000000,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (5)
  331.     CreateObject(987,572.09997559,-3084.80004883,53.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (6)
  332.     CreateObject(987,572.09997559,-3096.80004883,53.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (7)
  333.     CreateObject(987,572.20001221,-3108.80004883,53.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (8)
  334.     CreateObject(987,572.20001221,-3110.80004883,53.50000000,0.00000000,0.00000000,269.99450684); //object(elecfence_bar) (9)
  335.     CreateObject(987,601.59997559,-3085.10009766,53.50000000,0.00000000,0.00000000,90.00000000); //object(elecfence_bar) (10)
  336.     CreateObject(987,601.50000000,-3096.89990234,53.50000000,0.00000000,0.00000000,89.99450684); //object(elecfence_bar) (11)
  337.     CreateObject(987,601.59997559,-3108.89990234,53.50000000,0.00000000,0.00000000,89.99450684); //object(elecfence_bar) (12)
  338.     CreateObject(987,601.59997559,-3120.80004883,53.50000000,0.00000000,0.00000000,89.99450684); //object(elecfence_bar) (13)
  339.     CreateObject(987,601.79998779,-3122.80004883,53.50000000,0.00000000,0.00000000,89.99450684); //object(elecfence_bar) (14)
  340.     CreateObject(987,589.90002441,-3122.50000000,53.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (15)
  341.     CreateObject(987,577.90002441,-3122.50000000,53.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (16)
  342.     CreateObject(987,571.90002441,-3122.50000000,53.50000000,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (17)
  343.     CreateObject(1685,593.09997559,-3082.10009766,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (1)
  344.     CreateObject(1685,583.40002441,-3102.39990234,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (2)
  345.     CreateObject(1685,576.59997559,-3090.80004883,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (3)
  346.     CreateObject(1685,598.59997559,-3098.69995117,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (4)
  347.     CreateObject(1685,593.29998779,-3114.89990234,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (5)
  348.     CreateObject(1685,576.09997559,-3113.60009766,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (6)
  349.     CreateObject(1685,577.70001221,-3079.30004883,54.29999924,0.00000000,0.00000000,0.00000000); //object(blockpallet) (7)
  350.     AddStaticVehicleEx(413,1063.40002441,-1775.50000000,13.50000000,90.00000000,-1,-1,15); //Pony
  351.     AddStaticVehicleEx(422,1077.69995117,-1766.69995117,13.39999962,90.00000000,-1,-1,15); //Bobcat
  352.     AddStaticVehicleEx(554,1062.90002441,-1755.00000000,13.60000038,90.00000000,-1,-1,15); //Yosemite
  353.     AddStaticVehicleEx(506,1097.80004883,-1752.50000000,13.19999981,90.00000000,-1,-1,15); //Super GT
  354.     AddStaticVehicleEx(541,1097.90002441,-1772.40002441,13.10000038,90.00000000,-1,-1,15); //Bullet
  355.     AddStaticVehicleEx(522,1098.80004883,-1763.90002441,13.00000000,90.00000000,-1,-1,15); //NRG-500
  356.     AddStaticVehicleEx(522,1085.69995117,-1760.90002441,13.00000000,90.00000000,-1,-1,15); //NRG-500
  357.     AddStaticVehicleEx(522,1063.19995117,-1766.50000000,13.00000000,90.00000000,-1,-1,15); //NRG-500
  358.     AddStaticVehicleEx(522,1078.69995117,-1774.80004883,13.00000000,90.00000000,-1,-1,15); //NRG-500
  359.     AddStaticVehicleEx(521,1062.90002441,-1749.59997559,13.00000000,90.00000000,-1,-1,15); //FCR-900
  360.     AddStaticVehicleEx(521,1085.19995117,-1769.09997559,13.00000000,90.00000000,-1,-1,15); //FCR-900
  361.     AddStaticVehicleEx(586,1099.00000000,-1755.30004883,13.00000000,90.00000000,-1,-1,15); //Wayfarer
  362.     AddStaticVehicleEx(586,1064.09997559,-1737.80004883,13.00000000,90.00000000,-1,-1,15); //Wayfarer
  363.     CreateObject(984,1065.69995117,-1777.09997559,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (1)
  364.     CreateObject(984,1078.40002441,-1777.09997559,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (2)
  365.     CreateObject(984,1091.19995117,-1777.09997559,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (3)
  366.     CreateObject(984,1095.50000000,-1777.09997559,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (4)
  367.     CreateObject(984,1101.90002441,-1770.70007324,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (5)
  368.     CreateObject(984,1101.90002441,-1758.00000000,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (6)
  369.     CreateObject(984,1059.29992676,-1770.65991211,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (7)
  370.     CreateObject(984,1059.29992676,-1757.90002441,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (8)
  371.     CreateObject(984,1059.29992676,-1745.09997559,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (9)
  372.     CreateObject(984,1059.30004883,-1742.30004883,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (10)
  373.     CreateObject(984,1065.69006348,-1735.90002441,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (11)
  374.     CreateObject(984,1078.40002441,-1735.90002441,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (12)
  375.     CreateObject(984,1091.19995117,-1735.90002441,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (13)
  376.     CreateObject(984,1095.19995117,-1735.90002441,13.00000000,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (14)
  377.     CreateObject(966,1101.69995117,-1736.09997559,12.60000038,0.00000000,0.00000000,92.00000000); //object(bar_gatebar01) (1)
  378.     CreateObject(984,1101.90002441,-1749.48999023,13.00000000,0.00000000,0.00000000,0.00000000); //object(fenceshit2) (15)
  379.     CreateObject(968,1101.70007324,-1736.00000000,13.60000038,0.00000000,0.00000000,270.00000000); //object(barrierturn) (1)
  380.     AddStaticVehicle(415,1574.9547,-1877.7562,13.2327,270.1637,0,0); // mafia car 1
  381.     AddStaticVehicle(415,1568.8975,-1877.8414,13.2330,269.1317,0,0); // mafia car 2
  382.     AddStaticVehicle(415,1562.9204,-1877.8121,13.2333,269.4261,0,0); // mafia car 3
  383.     AddStaticVehicle(415,1557.1274,-1877.8124,13.2330,268.8275,0,0); // mafia car 4
  384.     AddStaticVehicle(470,2753.9539,-2429.8955,13.6364,358.9632,43,0); // army car 1
  385.     AddStaticVehicle(470,2753.8162,-2436.0510,13.6404,358.0538,43,0); // army car 2
  386.     AddStaticVehicle(470,2753.6538,-2442.0452,13.6377,358.6379,43,0); // army car 3
  387.     AddStaticVehicle(470,2753.5771,-2448.3992,13.6376,359.8399,43,0); // army car 4
  388.     AddStaticVehicle(470,2753.5642,-2454.8157,13.6349,359.6396,43,0); // army car 5
  389.     AddStaticVehicle(470,2753.4824,-2460.7576,13.6347,359.6992,43,0); // army car 6
  390.     AddStaticVehicle(470,2753.4666,-2466.8186,13.6425,359.2469,43,0); // army car 7
  391.     AddStaticVehicle(470,2753.3992,-2472.9429,13.6414,0.4665,43,0); // army car 8
  392.     AddStaticVehicle(425,2753.3333,-2393.4395,14.2326,236.6077,43,0); // army heli
  393.     AddStaticVehicleEx(420,1731.90002441,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  394.     AddStaticVehicleEx(420,1739.09997559,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  395.     AddStaticVehicleEx(420,1746.09997559,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  396.     AddStaticVehicleEx(420,1752.80004883,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  397.     AddStaticVehicleEx(420,1759.59997559,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  398.     AddStaticVehicleEx(420,1766.09997559,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  399.     AddStaticVehicleEx(420,1773.09997559,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  400.     AddStaticVehicleEx(420,1779.80004883,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  401.     AddStaticVehicleEx(420,1786.50000000,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  402.     AddStaticVehicleEx(420,1793.30004883,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  403.     AddStaticVehicleEx(420,1800.00000000,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  404.     AddStaticVehicleEx(420,1807.00000000,-1857.30004883,13.30000019,90.00000000,-1,-1,15); //Taxi
  405.     AddStaticVehicleEx(437,1735.09997559,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  406.     AddStaticVehicleEx(437,1748.59997559,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  407.     AddStaticVehicleEx(437,1761.19995117,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  408.     AddStaticVehicleEx(437,1774.69995117,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  409.     AddStaticVehicleEx(437,1787.50000000,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  410.     AddStaticVehicleEx(437,1800.00000000,-1852.40002441,13.69999981,90.00000000,-1,-1,15); //Coach
  411.     AddStaticVehicleEx(409,1492.09997559,-1737.80004883,13.30000019,90.00000000,-1,-1,15); //Stretch
  412.     AddStaticVehicleEx(409,1480.69995117,-1737.80004883,13.30000019,90.00000000,-1,-1,15); //Stretch
  413.     AddStaticVehicleEx(409,1469.69995117,-1737.80004883,13.30000019,90.00000000,-1,-1,15); //Stretch
  414.     AddStaticVehicleEx(425,1978.00000000,-2458.30004883,14.19999981,0.00000000,-1,-1,15); //Hunter
  415.     AddStaticVehicleEx(425,1964.59997559,-2457.80004883,14.19999981,0.00000000,-1,-1,15); //Hunter
  416.     AddStaticVehicleEx(425,1950.59997559,-2457.19995117,14.19999981,0.00000000,-1,-1,15); //Hunter
  417.     AddStaticVehicleEx(425,1935.90002441,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  418.     AddStaticVehicleEx(425,1922.09997559,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  419.     AddStaticVehicleEx(425,1908.09997559,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  420.     AddStaticVehicleEx(425,1893.59997559,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  421.     AddStaticVehicleEx(425,1879.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  422.     AddStaticVehicleEx(425,1866.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  423.     AddStaticVehicleEx(425,1852.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  424.     AddStaticVehicleEx(425,1839.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  425.     AddStaticVehicleEx(425,1825.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  426.     AddStaticVehicleEx(425,1811.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  427.     AddStaticVehicleEx(425,1798.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  428.     AddStaticVehicleEx(425,1783.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  429.     AddStaticVehicleEx(425,1770.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  430.     AddStaticVehicleEx(425,1757.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  431.     AddStaticVehicleEx(425,1743.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  432.     AddStaticVehicleEx(425,1729.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  433.     AddStaticVehicleEx(425,1716.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  434.     AddStaticVehicleEx(425,1704.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  435.     AddStaticVehicleEx(425,1689.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  436.     AddStaticVehicleEx(425,1675.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  437.     AddStaticVehicleEx(425,1661.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  438.     AddStaticVehicleEx(425,1647.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  439.     AddStaticVehicleEx(425,1634.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  440.     AddStaticVehicleEx(425,1620.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  441.     AddStaticVehicleEx(425,1607.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  442.     AddStaticVehicleEx(425,1593.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  443.     AddStaticVehicleEx(425,1580.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  444.     AddStaticVehicleEx(425,1565.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  445.     AddStaticVehicleEx(425,1551.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  446.     AddStaticVehicleEx(425,1537.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  447.     AddStaticVehicleEx(425,1523.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  448.     AddStaticVehicleEx(425,1508.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  449.     AddStaticVehicleEx(425,1495.50000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  450.     AddStaticVehicleEx(425,1481.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  451.     AddStaticVehicleEx(425,1467.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  452.     AddStaticVehicleEx(425,1453.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  453.     AddStaticVehicleEx(425,1439.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  454.     AddStaticVehicleEx(425,1425.30004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  455.     AddStaticVehicleEx(425,1411.80004883,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  456.     AddStaticVehicleEx(425,1398.00000000,-2457.10009766,14.19999981,0.00000000,-1,-1,15); //Hunter
  457.     AddStaticVehicleEx(520,2065.89990234,-2619.50000000,14.50000000,0.00000000,-1,-1,15); //Hydra
  458.     AddStaticVehicleEx(520,2053.39990234,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  459.     AddStaticVehicleEx(520,2041.40002441,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  460.     AddStaticVehicleEx(520,2029.90002441,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  461.     AddStaticVehicleEx(520,2018.09997559,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  462.     AddStaticVehicleEx(520,2006.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  463.     AddStaticVehicleEx(520,1994.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  464.     AddStaticVehicleEx(520,1982.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  465.     AddStaticVehicleEx(520,1970.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  466.     AddStaticVehicleEx(520,1959.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  467.     AddStaticVehicleEx(520,1947.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  468.     AddStaticVehicleEx(520,1935.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  469.     AddStaticVehicleEx(520,1922.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  470.     AddStaticVehicleEx(520,1911.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  471.     AddStaticVehicleEx(520,1899.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  472.     AddStaticVehicleEx(520,1887.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  473.     AddStaticVehicleEx(520,1875.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  474.     AddStaticVehicleEx(520,1863.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  475.     AddStaticVehicleEx(520,1851.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  476.     AddStaticVehicleEx(520,1839.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  477.     AddStaticVehicleEx(520,1827.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  478.     AddStaticVehicleEx(520,1815.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  479.     AddStaticVehicleEx(520,1803.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  480.     AddStaticVehicleEx(520,1791.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  481.     AddStaticVehicleEx(520,1779.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  482.     AddStaticVehicleEx(520,1767.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  483.     AddStaticVehicleEx(520,1755.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  484.     AddStaticVehicleEx(520,1743.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  485.     AddStaticVehicleEx(520,1731.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  486.     AddStaticVehicleEx(520,1718.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  487.     AddStaticVehicleEx(520,1706.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  488.     AddStaticVehicleEx(520,1694.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  489.     AddStaticVehicleEx(520,1682.59997559,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  490.     AddStaticVehicleEx(520,1670.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  491.     AddStaticVehicleEx(520,1658.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  492.     AddStaticVehicleEx(520,1646.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  493.     AddStaticVehicleEx(520,1633.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  494.     AddStaticVehicleEx(520,1621.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  495.     AddStaticVehicleEx(520,1609.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  496.     AddStaticVehicleEx(520,1597.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  497.     AddStaticVehicleEx(520,1584.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  498.     AddStaticVehicleEx(520,1572.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  499.     AddStaticVehicleEx(520,1560.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  500.     AddStaticVehicleEx(520,1548.09997559,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  501.     AddStaticVehicleEx(520,1536.09997559,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  502.     AddStaticVehicleEx(520,1523.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  503.     AddStaticVehicleEx(520,1511.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  504.     AddStaticVehicleEx(520,1499.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  505.     AddStaticVehicleEx(520,1486.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  506.     AddStaticVehicleEx(520,1473.80004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  507.     AddStaticVehicleEx(520,1461.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  508.     AddStaticVehicleEx(520,1449.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  509.     AddStaticVehicleEx(520,1437.30004883,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  510.     AddStaticVehicleEx(520,1425.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  511.     AddStaticVehicleEx(520,1413.50000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  512.     AddStaticVehicleEx(520,1401.00000000,-2619.60009766,14.50000000,0.00000000,-1,-1,15); //Hydra
  513.     AddStaticVehicleEx(596,1601.09997559,-1684.30004883,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  514.     AddStaticVehicleEx(596,1601.09997559,-1688.00000000,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  515.     AddStaticVehicleEx(596,1601.09997559,-1692.00000000,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  516.     AddStaticVehicleEx(596,1601.09997559,-1696.30004883,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  517.     AddStaticVehicleEx(596,1601.09997559,-1700.30004883,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  518.     AddStaticVehicleEx(596,1601.09997559,-1704.30004883,5.69999981,90.00000000,-1,1,15); //Police Car (LSPD)
  519.     AddStaticVehicleEx(596,1595.30004883,-1710.80004883,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  520.     AddStaticVehicleEx(596,1591.30004883,-1710.69995117,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  521.     AddStaticVehicleEx(596,1587.30004883,-1710.59997559,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  522.     AddStaticVehicleEx(596,1583.09997559,-1710.50000000,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  523.     AddStaticVehicleEx(596,1578.40002441,-1710.40002441,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  524.     AddStaticVehicleEx(596,1574.19995117,-1710.30004883,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  525.     AddStaticVehicleEx(596,1570.00000000,-1710.19995117,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  526.     AddStaticVehicleEx(596,1559.00000000,-1709.90002441,5.69999981,0.00000000,-1,1,15); //Police Car (LSPD)
  527.     AddStaticVehicleEx(432,1564.59997559,-1710.30004883,6.00000000,0.00000000,-1,-1,15); //Rhino
  528.     AddStaticVehicleEx(432,2782.60009766,-2418.00000000,13.69999981,90.00000000,-1,-1,15); //Rhino
  529.     AddStaticVehicleEx(432,2783.30004883,-2456.69995117,13.69999981,90.00000000,-1,-1,15); //Rhino
  530.     AddStaticVehicleEx(432,2783.69995117,-2493.89990234,13.69999981,90.00000000,-1,-1,15); //Rhino
  531.     CreateObject(984,1706.19995117,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (1)
  532.     CreateObject(984,1718.90002441,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (2)
  533.     CreateObject(984,1731.59997559,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (3)
  534.     CreateObject(984,1744.30004883,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (4)
  535.     CreateObject(984,1757.00000000,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (5)
  536.     CreateObject(984,1769.80004883,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (6)
  537.     CreateObject(984,1782.50000000,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (7)
  538.     CreateObject(984,1795.30004883,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (8)
  539.     CreateObject(984,1804.80004883,-1860.00000000,13.19999981,0.00000000,0.00000000,90.00000000); //object(fenceshit2) (9)
  540.     SetTimer("Online",60*1000*60,1);
  541.     SetTimer("PayDay",360000,1);
  542.     SetTimer("ScoreUpdate", 1000, 1);
  543.     // Creating the textdraws:
  544.     Textdraw0 = TextDrawCreate(3.000000, 435.000000, "www.bigflashgaming.net");
  545.     TextDrawBackgroundColor(Textdraw0, 255);
  546.     TextDrawFont(Textdraw0, 1);
  547.     TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
  548.     TextDrawColor(Textdraw0, 16777215);
  549.     TextDrawSetOutline(Textdraw0, 0);
  550.     TextDrawSetProportional(Textdraw0, 1);
  551.     TextDrawSetShadow(Textdraw0, 0);
  552.  
  553.     Textdraw1 = TextDrawCreate(347.000000, 433.000000, "/tp <--- Choose where you wanna go");
  554.     TextDrawBackgroundColor(Textdraw1, 255);
  555.     TextDrawFont(Textdraw1, 1);
  556.     TextDrawLetterSize(Textdraw1, 0.330000, 1.200000);
  557.     TextDrawColor(Textdraw1, -1);
  558.     TextDrawSetOutline(Textdraw1, 0);
  559.     TextDrawSetProportional(Textdraw1, 1);
  560.     TextDrawSetShadow(Textdraw1, 1);
  561.  
  562.     Textdraw2 = TextDrawCreate(480.000000, 99.000000, "Creator(SAMP Forums): ZackBoolaro");
  563.     TextDrawBackgroundColor(Textdraw2, 255);
  564.     TextDrawFont(Textdraw2, 1);
  565.     TextDrawLetterSize(Textdraw2, 0.250000, 0.699999);
  566.     TextDrawColor(Textdraw2, 255);
  567.     TextDrawSetOutline(Textdraw2, 0);
  568.     TextDrawSetProportional(Textdraw2, 1);
  569.     TextDrawSetShadow(Textdraw2, 0);
  570.  
  571.     for(new i; i < MAX_PLAYERS; i ++)
  572.     {
  573.         if(IsPlayerConnected(i))
  574.         {
  575.             TextDrawShowForPlayer(i, Textdraw0);
  576.             TextDrawShowForPlayer(i, Textdraw1);
  577.             TextDrawShowForPlayer(i, Textdraw2);
  578.         }
  579.     }
  580.     return 1;
  581. }
  582.  
  583. public OnGameModeExit()
  584. {
  585.     print("\n----------------------------------");
  586.     print("______Thank you for using Team Wars by ZackBoolaro(Zack_Martines) ______");
  587.     print("----------------------------------\n");
  588.     TextDrawHideForAll(Textdraw0);
  589.     TextDrawDestroy(Textdraw0);
  590.     TextDrawHideForAll(Textdraw1);
  591.     TextDrawDestroy(Textdraw1);
  592.     TextDrawHideForAll(Textdraw2);
  593.     TextDrawDestroy(Textdraw2);
  594.     return 1;
  595. }
  596.  
  597. public OnPlayerRequestClass(playerid, classid)
  598. {
  599.     SetPVarInt(playerid, "Joinned", 1);
  600.     return 1;
  601. }
  602.  
  603. public OnPlayerConnect(playerid)
  604. {
  605.     new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
  606.     GetPlayerName(playerid, pname, sizeof(pname));
  607.     format(string, sizeof(string), "%s has joined the server", pname);
  608.     SendClientMessageToAll(COLOR_YELLOW, string);
  609.     new naslov2[128], text[128], strText[104];
  610.  
  611.     format(strText, 35, USER_FILE, GetName(playerid));
  612.  
  613.     if(!INI_Exists(strText))
  614.     {
  615.         format(naslov2, sizeof(naslov2), ""COL_BLUE2"     Welcome"COL_WHITE" %s!", GetName(playerid)); //formating our title, some text, colors balabalbal
  616.         format(text, sizeof(text), ""COL_WHITE"______________________________\n\n"COL_BLUE2"Name"COL_WHITE" %s"COL_BLUE2" isn't registered!\n\nPlease register!", GetName(playerid)); //formating our text
  617.         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, naslov2, text, "Register", "Exit"); //showing player dialog for registering
  618.     }
  619.     else
  620.     {
  621.         format(naslov2, sizeof(naslov2), ""COL_GREEN2"     Welcome"COL_WHITE" %s!", GetName(playerid)); //formating our title, some text, colors...
  622.         format(text, sizeof(text),""COL_WHITE"______________________________\n\n"COL_GREEN2"Name"COL_WHITE" %s"COL_GREEN2" is registered!\n\nPlease login!", GetName(playerid)); //formating our text in dialog
  623.         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, naslov2, text, "Login", "Exit"); //showing player dialog for login
  624.     }
  625.  
  626.     SetPVarInt(playerid, "Joinned", 1);
  627.     PlayerInfo[playerid][pLevel] = 1;
  628.     PlayerInfo[playerid][pExp] = 0;
  629.     SendClientMessage(playerid, COLOR_BRIGHTRED , "Welcome to Big Flash Gaming, you have been auto setted to Civilian !");
  630.     SendClientMessage(playerid, COLOR_BRIGHTRED , "If you want to change your team use these commands /lspd, /groove, /balla, /civilian /vagos /aztecas /army /mafia !");
  631.     SendClientMessage(playerid, COLOR_BRIGHTRED , "Be sure to read /rules so you don't end up BANNED !");
  632.     TextDrawShowForPlayer(playerid, Textdraw0);
  633.     TextDrawShowForPlayer(playerid, Textdraw1);
  634.     TextDrawShowForPlayer(playerid, Textdraw2);
  635.     PlayerInfo[playerid][pCanSpawnVehicle] = true;
  636.     return 1;
  637. }
  638.  
  639. public OnPlayerDisconnect(playerid, reason)
  640. {
  641.     OnPlayerLogout(playerid);
  642.     if(IsBeingSpeced[playerid] == 1)
  643.     {
  644.         foreach(Player,i)
  645.         {
  646.             if(spectatorid[i] == playerid)
  647.             {
  648.                 TogglePlayerSpectating(i,false);
  649.             }
  650.         }
  651.     }
  652.     new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
  653.     GetPlayerName(playerid, pname, sizeof(pname));
  654.     switch(reason)
  655.     {
  656.         case 0: format(string, sizeof(string), "%s has left the server. (Lost Connection/Crashed)", pname);
  657.         case 1: format(string, sizeof(string), "%s has left the server. (Leaving)", pname);
  658.         case 2: format(string, sizeof(string), "%s has left the server. (Kicked)", pname);
  659.     }
  660.     SendClientMessageToAll(COLOR_YELLOW, string);
  661.     return 1;
  662. }
  663.  
  664. public OnPlayerSpawn(playerid)
  665. {
  666.     SetPlayerHealth(playerid,99999);
  667.     SetTimerEx("SpawnProtection",5000,0,"i",playerid);
  668.     if(IsSpecing[playerid] == 1)
  669.     {
  670.         SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  671.         SetPlayerInterior(playerid,Inter[playerid]);
  672.         SetPlayerVirtualWorld(playerid,vWorld[playerid]);
  673.         IsSpecing[playerid] = 0;
  674.         IsBeingSpeced[spectatorid[playerid]] = 0;
  675.     }
  676.     if(GetPVarInt(playerid, "Joinned") == 1)
  677.     {
  678.         GivePlayerMoney(playerid, PlayerInfo[playerid][pMoney]); //setting player money from file
  679.         SetPlayerScore(playerid, PlayerInfo[playerid][pScore]); //setting player score from file
  680.  
  681.         SetPVarInt(playerid, "Joinned", 0);
  682.     }
  683.     pTeam[playerid] = team_civ;
  684.     if (PlayerInfo[playerid][pDM] == 1)
  685.     {
  686.         SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  687.         SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  688.     } else {
  689.     // nothing here
  690.     }
  691.     return 1;
  692. }
  693.  
  694. public SpawnProtection(playerid)
  695. {
  696.     SetPlayerHealth(playerid,100.0);
  697.     SendClientMessage(playerid,COLOR_YELLOW,"Spawn Protection Over!");
  698.     return 1;
  699. }
  700.  
  701. public OnPlayerDeath(playerid, killerid, reason)
  702. {
  703.     SendDeathMessage(killerid, playerid, reason);
  704.     StopAudioStreamForPlayer(playerid);
  705.     PlayerInfo[killerid][pKills]++;
  706.     PlayerInfo[playerid][pDeaths]++;
  707.     if(IsBeingSpeced[playerid] == 1)
  708.     {
  709.         foreach(Player,i)
  710.         {
  711.             if(spectatorid[i] == playerid)
  712.             {
  713.                 TogglePlayerSpectating(i,false);
  714.             }
  715.         }
  716.     }
  717.     return 1;
  718. }
  719.  
  720. public OnVehicleSpawn(vehicleid)
  721. {
  722.     return 1;
  723. }
  724.  
  725. public OnVehicleDeath(vehicleid, killerid)
  726. {
  727.     return 1;
  728. }
  729.  
  730. //Level System Update
  731. public ScoreUpdate()
  732. {
  733.     new Score;
  734.     new name[MAX_PLAYER_NAME];
  735.     for(new i=0; i<MAX_PLAYERS; i++)
  736.     {
  737.         if (IsPlayerConnected(i))
  738.         {
  739.             GetPlayerName(i, name, sizeof(name));
  740.             Score = PlayerInfo[i][pLevel];
  741.             SetPlayerScore(i, Score);
  742.             if (Score > ScoreOld)
  743.             {
  744.                 ScoreOld = Score;
  745.             }
  746.         }
  747.     }
  748. }
  749.  
  750. public PayDay(playerid)
  751. {
  752.     for (new i; i < MAX_PLAYERS; i++)
  753.     {
  754.         if (IsPlayerConnected(i))
  755.         {
  756.             new nxtlevel = PlayerInfo[playerid][pLevel];
  757.             new payday = nxtlevel*0;
  758.             GivePlayerMoney(i,payday);
  759.             PlayerInfo[playerid][pExp]++;
  760.             GameTextForPlayer(i,"  ~p~ LevelPay",6,5000);
  761.             PlayerPlayMusic(playerid);
  762.         }
  763.     }
  764. }
  765. public PlayerPlayMusic(playerid)
  766. {
  767.     for(new i = 0; i < MAX_PLAYERS; i++)
  768.     {
  769.         if(IsPlayerConnected(i))
  770.         {
  771.             SetTimer("StopMusic", 5000, 0);
  772.             PlayerPlaySound(i, 1068, 0.0, 0.0, 0.0);
  773.         }
  774.     }
  775. }
  776. public StopMusic()
  777. {
  778.     for(new i = 0; i < MAX_PLAYERS; i++)
  779.     {
  780.         if(IsPlayerConnected(i))
  781.         {
  782.             PlayerPlaySound(i, 1069, 0.0, 0.0, 0.0);
  783.         }
  784.     }
  785. }
  786. //Level System Update End
  787.  
  788. //Msessage to Admins function
  789. forward SendAdminMessage(color, string[]);
  790. public SendAdminMessage(color, string[])
  791. {
  792.  foreach(Player, i)
  793.  {
  794.    if(PlayerInfo[i][pAdmin] >= 1)
  795.    {
  796.     SendClientMessage(i, color, string);
  797.    }
  798.  }
  799. }
  800.  
  801. CMD:report(playerid,params[])
  802. {
  803.  if(isnull(params)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /report [message]");
  804.  new string[256];
  805.  format(string,sizeof(string),"%s has reported: %s",GetPlayerNameEx(playerid),params);
  806.  SendAdminMessage(COLOR_YELLOW,string);
  807.  SendClientMessage(playerid,COLOR_YELLOW,"You're report has been sent.");
  808.  return 1;
  809. }
  810.  
  811. CMD:reportbug(playerid, params[])
  812. {
  813.     new text[512], name[MAX_PLAYER_NAME], bugstring[512], Float:x, Float:y, Float:z, File:Bugs;
  814.  
  815.     if(sscanf(params, "s[512]", text)) return SendClientMessage(playerid, COLOR_RED, " Incorrect fomat. Use /reportbug [description]");
  816.     if(strlen(text) > 512) return SendClientMessage(playerid, COLOR_RED," Description is too long (Max. 512 letters)");
  817.  
  818.     GetPlayerName(playerid, name, sizeof(name));
  819.     GetPlayerPos(playerid, x, y, z);
  820.     format(bugstring, sizeof(bugstring), "%s reported a bug. Description : %s, on coordinates : X:%f, Y:%f, Z:%f\r\n", name, text, x, y, z);
  821.  
  822.     Bugs = fopen("BigFlashGaming/Bugs/Reports.txt", io_append);
  823.     fwrite(Bugs, bugstring);
  824.     fclose(Bugs);
  825.  
  826.     SendClientMessage(playerid, COLOR_YELLOW, " Thank you. You successfully reported a bug.");
  827.  
  828.     return 1;
  829. }
  830.  
  831. CMD:levelup(playerid,params[])
  832. {
  833.         new string[30];
  834.         if(IsPlayerConnected(playerid) == 1)
  835.         {
  836.             new points[248];
  837.             new nxtlevel = PlayerInfo[playerid][pLevel]+1;
  838.             new expamount = nxtlevel*levelexp;
  839.             if(PlayerInfo[playerid][pExp] < expamount)
  840.             {
  841.                 format(points,sizeof(points)," You need [%d] Exp Points in order to level up, You currently have [%d]",expamount,PlayerInfo[playerid][pExp]); // Format, This is pretty obvious.
  842.                 SendClientMessage(playerid,COLOR_LIME,points);
  843.                 return 1;
  844.             }
  845.             else
  846.             {
  847.                 PlayerInfo[playerid][pExp] = 0;
  848.                 PlayerInfo[playerid][pLevel]++;
  849.                 format(string,sizeof(string),"~g~Your now level:[%d]",PlayerInfo[playerid][pLevel]);
  850.                 GameTextForPlayer(playerid,string,6000,1);
  851.                 return 1;
  852.             }
  853.         }
  854.         return 1;
  855. }
  856.  
  857. CMD:kill(playerid, params[])
  858. {
  859.     SetPlayerHealth(playerid, 0);
  860.     PlayerInfo[playerid][pDM] = 0;
  861.     return 1;
  862. }
  863.  
  864. CMD:help(playerid, params[])
  865. {
  866.         SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  867.         SendClientMessage(playerid, COLOR_GREY , "[SYSTEM] This is Team Wars by ZackBoolaro(Zack_Martines)");
  868.         SendClientMessage(playerid, COLOR_GREY , "[GUNS] /kill /getm4 /getmp5 /getak47 /getss /getshotgun");
  869.         SendClientMessage(playerid, COLOR_GREY , "[GENERAL] /report /levelup /report /reportbug /radio");
  870.         SendClientMessage(playerid, COLOR_GREY , "[GENERAL] /vehicle /radiooff /teams /tp /rules");
  871.         SendClientMessage(playerid, COLOR_GREEN,"_______________________________________");
  872.         if (PlayerInfo[playerid][pAdmin] >= 1)
  873.         {
  874.         SendClientMessage(playerid, COLOR_GREY, "[MODERATOR] /kick /ban /spec /specoff /ann");
  875.         }
  876.         if (PlayerInfo[playerid][pAdmin] >= 2)
  877.         {
  878.         SendClientMessage(playerid, COLOR_GREY, "[ADMINISTRATOR] /goto /gethere /rpw /dmradio /freeze /unfreeze");
  879.         }
  880.         if (PlayerInfo[playerid][pAdmin] >= 3)
  881.         {
  882.         SendClientMessage(playerid, COLOR_GREY, "[OWNER] /makeadmin /akill");
  883.         }
  884.         return 1;
  885. }
  886.  
  887. CMD:dmradio(playerid, params[])
  888. {
  889.     if(PlayerInfo[playerid][pAdmin] < 2)
  890.     {
  891.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  892.         return 1;
  893.     }
  894.     SendClientMessageToAll(COLOR_YELLOW, "DM Arena Radio is On !");
  895.     new Float:Pos[3];
  896.     GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  897.     for(new i = 0; i < MAX_PLAYERS; i++)
  898.     {
  899.     if(IsPlayerConnected(i))
  900.     {
  901.     if(IsPlayerInRangeOfPoint(i,100,Pos[0],Pos[1],Pos[2]))
  902.     {
  903.     StopAudioStreamForPlayer(i);
  904.     PlayAudioStreamForPlayer(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=118452");
  905.     }
  906.     }
  907.     }
  908.     return 1;
  909. }
  910.  
  911. CMD:makeadmin(playerid, params[])
  912. {
  913.     if (IsPlayerAdmin(playerid))
  914.     {
  915.     new Value, TargetID;
  916.     if(sscanf(params, "ui", TargetID, Value)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makeadmin [playerid] [level]"); }
  917.     PlayerInfo[TargetID][pAdmin] = Value;
  918.     } else {
  919.     SendClientMessage(playerid, 0xE60000FF, "You are not a lead admin!");
  920.     }
  921.     return 1;
  922. }
  923.  
  924. CMD:rpw( playerid, params[ ] )
  925. {
  926.     if(PlayerInfo[playerid][pAdmin] < 2)
  927.     {
  928.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  929.         return 1;
  930.     }
  931.     new Value, TargetID;
  932.     if(sscanf(params, "ui", TargetID, Value)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rpw [playerid] [0 or 1]"); }
  933.     if( !IsPlayerConnected( TargetID ) && TargetID == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Invalid player ID!" );
  934.     PlayerInfo[TargetID][pAllowed_To_Use] = Value;
  935.     return 1;
  936. }
  937.  
  938. CMD:goto(playerid, params[])
  939. {
  940.     if(PlayerInfo[playerid][pAdmin] < 2)
  941.     {
  942.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  943.         return 1;
  944.     }
  945.     if (PlayerInfo[playerid][pDM] == 1)
  946.         {
  947.         SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  948.         SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  949.         } else {
  950.     new id;
  951.     if(sscanf(params, "u", id)) SendClientMessage(playerid, 0xFF0000FF, "USAGE: /goto [id]");
  952.     else if(!IsPlayerConnected(id) || id == playerid) return SendClientMessage(playerid, COLOR_GREY, "This player is offline or it is yourself");
  953.     else
  954.     {
  955.     new Float:x, Float:y, Float:z;
  956.     GetPlayerPos(id, x, y, z);
  957.     SetPlayerPos(playerid, x+1, y+1, z);
  958.     }
  959.     }
  960.     return 1;
  961. }
  962.  
  963. CMD:gethere(playerid,params[])
  964. {
  965.     if(PlayerInfo[playerid][pAdmin] < 2)
  966.     {
  967.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  968.         return 1;
  969.     }
  970.     new targetid, Float:x, Float:y, Float:z;
  971.     if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /gethere [id]");
  972.     if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected");
  973.     GetPlayerPos(playerid, x, y, z);
  974.     SetPlayerPos(targetid, x, y+0.5, z+0.5);
  975.     return 1;
  976. }
  977.  
  978. CMD:freeze(playerid, params[])
  979. {
  980.     if(PlayerInfo[playerid][pAdmin] < 2)
  981.     {
  982.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  983.         return 1;
  984.     }
  985.     new giveplayerid;
  986.     if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /freeze [playerid/name]");
  987.     if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Invalid username/ID");
  988.     TogglePlayerControllable(giveplayerid, 0);
  989.     SendClientMessage(playerid, COLOR_GREY, "You have frozen %s");
  990.     return 1;
  991. }
  992.  
  993. CMD:akill(playerid, params[])
  994. {
  995.     if(PlayerInfo[playerid][pAdmin] < 3)
  996.     {
  997.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  998.         return 1;
  999.     }
  1000.     new giveplayerid;
  1001.     if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /akill [playerid/name]");
  1002.     if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Invalid username/ID");
  1003.     new string[128];
  1004.     SetPlayerHealth(giveplayerid, 0);
  1005.     format(string, sizeof(string), "Admin %s killed %s with admin command!", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
  1006.     SendClientMessageToAll(COLOR_YELLOW, string);
  1007.     return 1;
  1008. }
  1009.  
  1010. CMD:unfreeze(playerid, params[])
  1011. {
  1012.     if(PlayerInfo[playerid][pAdmin] < 2)
  1013.     {
  1014.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  1015.         return 1;
  1016.     }
  1017.     new giveplayerid;
  1018.     if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /unfreeze [playerid/name]");
  1019.     if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_GREY, "Invalid username/ID");
  1020.     TogglePlayerControllable(giveplayerid, 1);
  1021.     return 1;
  1022. }
  1023.  
  1024. CMD:ann(playerid, params[])
  1025. {
  1026.     if(PlayerInfo[playerid][pAdmin] < 2)
  1027.     {
  1028.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  1029.         return 1;
  1030.     }
  1031.     if(isnull(params)) return SendClientMessage(playerid,COLOR_WHITE,"USAGE: /ann [message]");
  1032.     if(PlayerInfo[playerid][pAdmin] < 1)
  1033.     {
  1034.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  1035.         return 1;
  1036.     }
  1037.     if(PlayerInfo[playerid][pAdmin] == 1)
  1038.     {
  1039.         new string[128];
  1040.         format(string, sizeof(string), " {00FFFF}Server Mod{FFFFFF} %s: %s ", GetPlayerNameEx(playerid), params);
  1041.         SendClientMessageToAll(COLOR_WHITE, string);
  1042.         return 1;
  1043.     }
  1044.     if(PlayerInfo[playerid][pAdmin] == 2)
  1045.     {
  1046.         new string[128];
  1047.         format(string, sizeof(string), " {00FFFF}Server Admin{FFFFFF} %s: %s ", GetPlayerNameEx(playerid), params);
  1048.         SendClientMessageToAll(COLOR_WHITE, string);
  1049.         return 1;
  1050.     }
  1051.     if(PlayerInfo[playerid][pAdmin] == 3)
  1052.     {
  1053.         new string[128];
  1054.         format(string, sizeof(string), " {00FFFF}Server Owner{FFFFFF} %s: %s ", GetPlayerNameEx(playerid), params);
  1055.         SendClientMessageToAll(COLOR_WHITE, string);
  1056.         return 1;
  1057.     }
  1058.     new sendername[MAX_PLAYER_NAME], string[128];
  1059.     GetPlayerName(playerid, sendername, sizeof(sendername));
  1060.     format(string, sizeof(string), " %s: %s ", sendername, params);
  1061.     SendClientMessageToAll(COLOR_WHITE, string);
  1062.     return 1;
  1063. }
  1064.  
  1065. CMD:spec(playerid, params[])
  1066. {
  1067.     if(PlayerInfo[playerid][pAdmin] < 1)
  1068.     {
  1069.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  1070.         return 1;
  1071.     }
  1072.     if (PlayerInfo[playerid][pDM] == 1)
  1073.     {
  1074.         SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1075.         SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1076.         TogglePlayerSpectating(playerid, 0);
  1077.     } else {
  1078.     new id;
  1079.     if(sscanf(params,"u", id))return SendClientMessage(playerid, COLOR_GREY, "Usage: /spec [id]");
  1080.     if(id == playerid)return SendClientMessage(playerid,COLOR_GREY,"You cannot spec yourself.");
  1081.     if(id == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_GREY, "Player not found!");
  1082.     if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,COLOR_GREY,"You are already specing someone.");
  1083.     GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);
  1084.     Inter[playerid] = GetPlayerInterior(playerid);
  1085.     vWorld[playerid] = GetPlayerVirtualWorld(playerid);
  1086.     TogglePlayerSpectating(playerid, true);
  1087.     if(IsPlayerInAnyVehicle(id))
  1088.     {
  1089.         if(GetPlayerInterior(id) > 0)
  1090.         {
  1091.             SetPlayerInterior(playerid,GetPlayerInterior(id));
  1092.         }
  1093.         if(GetPlayerVirtualWorld(id) > 0)
  1094.         {
  1095.             SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  1096.         }
  1097.         PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));
  1098.     }
  1099.     else
  1100.     {
  1101.         if(GetPlayerInterior(id) > 0)
  1102.         {
  1103.             SetPlayerInterior(playerid,GetPlayerInterior(id));
  1104.         }
  1105.         if(GetPlayerVirtualWorld(id) > 0)
  1106.         {
  1107.             SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
  1108.         }
  1109.         PlayerSpectatePlayer(playerid,id);
  1110.     }
  1111.     GetPlayerName(id, Name, sizeof(Name));
  1112.     format(String, sizeof(String),"You have started to spectate %s.",Name);
  1113.     SendClientMessage(playerid,0x0080C0FF,String);
  1114.     IsSpecing[playerid] = 1;
  1115.     IsBeingSpeced[id] = 1;
  1116.     spectatorid[playerid] = id;
  1117.     }
  1118.     return 1;
  1119.  
  1120. }
  1121.  
  1122. CMD:specoff(playerid, params[])
  1123. {
  1124.     if(PlayerInfo[playerid][pAdmin] < 1)
  1125.     {
  1126.         SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use that cmd!");
  1127.         return 1;
  1128.     }
  1129.     if(IsSpecing[playerid] == 0)return SendClientMessage(playerid,COLOR_GREY,"You are not spectating anyone.");
  1130.     TogglePlayerSpectating(playerid, 0);
  1131.     return 1;
  1132. }
  1133.  
  1134. CMD:getm4(playerid, params[])
  1135. {
  1136.     if(PlayerInfo[playerid][pAllowed_To_Use] == 1) return SendClientMessage(playerid, -1, "Weapon commands are disabled for you!");
  1137.     GivePlayerWeapon(playerid, 31, 1000);
  1138.     SendClientMessage(playerid, COLOR_GREEN , "You have given yourself a M4");
  1139.     return 1;
  1140. }
  1141.  
  1142. CMD:getmp5(playerid, params[])
  1143. {
  1144.     if(PlayerInfo[playerid][pAllowed_To_Use] == 1) return SendClientMessage(playerid, -1, "Weapon commands are disabled for you!");
  1145.     GivePlayerWeapon(playerid, 29, 1000);
  1146.     SendClientMessage(playerid, COLOR_GREEN , "You have given yourself a MP5");
  1147.     return 1;
  1148. }
  1149.  
  1150. CMD:getak47(playerid, params[])
  1151. {
  1152.     if(PlayerInfo[playerid][pAllowed_To_Use] == 1) return SendClientMessage(playerid, -1, "Weapon commands are disabled for you!");
  1153.     GivePlayerWeapon(playerid, 30, 1000);
  1154.     SendClientMessage(playerid, COLOR_GREEN , "You have given yourself a AK47");
  1155.     return 1;
  1156. }
  1157.  
  1158. CMD:getss(playerid, params[])
  1159. {
  1160.     if(PlayerInfo[playerid][pAllowed_To_Use] == 1) return SendClientMessage(playerid, -1, "Weapon commands are disabled for you!");
  1161.     GivePlayerWeapon(playerid, 26, 1000);
  1162.     SendClientMessage(playerid, COLOR_GREEN , "You have given yourself a Sawn-off Shotgun");
  1163.     return 1;
  1164. }
  1165.  
  1166. CMD:getshotgun(playerid, params[])
  1167. {
  1168.     if(PlayerInfo[playerid][pAllowed_To_Use] == 1) return SendClientMessage(playerid, -1, "Weapon commands are disabled for you!");
  1169.     GivePlayerWeapon(playerid, 25, 1000);
  1170.     SendClientMessage(playerid, COLOR_GREEN , "You have given yourself a Shotgun");
  1171.     return 1;
  1172. }
  1173.  
  1174. CMD:radio(playerid, params[])
  1175. {
  1176.     ShowPlayerDialog(playerid, 9998, DIALOG_STYLE_LIST, "Radio Stations", "TheVoice (Country: Bulgaria, HipHop and RnB) \nCity (Country: Bulgaria, HipHop and RnB)\nMassive Dubstep (Country: Unknown, Dubstep)\nTangra Mega Rock (Country: Bulgaria, Rock)\nVeronika (Country: Bulgaria, Pop-Folk)\nOfficial Radio", "Listen", "Close");
  1177.     return 1;
  1178. }
  1179.  
  1180. CMD:teams(playerid, params[])
  1181. {
  1182.     ShowPlayerDialog(playerid, 10, DIALOG_STYLE_LIST, "Teams", "LSPD \nArmy\nBalla\nGroove\nVagos\nAztecas\nMafia\nCivil", "Choose", "Close");
  1183.     return 1;
  1184. }
  1185.  
  1186. CMD:tp(playerid, params[])
  1187. {
  1188.     ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Locations", "DM Zone \nHydras Zone\nHunters Zone", "Teleport to..", "Close");
  1189.     return 1;
  1190. }
  1191.  
  1192. CMD:rules(playerid, params[])
  1193. {
  1194.     ShowPlayerDialog(playerid, 12, DIALOG_STYLE_MSGBOX, "Rules of [BigFlashGaming] Team Wars", "NO Hacking\nNO Spawn Killing\nNO reports abuse\nNO Disrespect\nNO Server Advertising\nNO Heliblading", "Agree", "");
  1195.     return 1;
  1196. }
  1197.  
  1198. CMD:radiooff(playerid, params[])
  1199. {
  1200.     StopAudioStreamForPlayer(playerid);
  1201.     return 1;
  1202. }
  1203. //Function that gets the vehicle name from the ID of the specified vehicle
  1204. public GetVehicleModelIDFromName(vname[])
  1205. {
  1206.     for(new i = 0; i < 211; i++)
  1207.     {
  1208.         if ( strfind(VehicleNames[i], vname, true) != -1 )
  1209.             return i + 400;
  1210.     }
  1211.     return -1;
  1212. }
  1213.  
  1214. CMD:vehicle(playerid, params[])
  1215. {
  1216.     new Vehicle[32], VehicleID, ColorOne, ColorTwo;
  1217.     PlayerInfo[playerid][pCanSpawnVehicle] = true;
  1218.     if(sscanf(params, "s[32]D(1)D(1)", Vehicle, ColorOne, ColorTwo))
  1219.     {
  1220.         PlayerInfo[playerid][pCanSpawnVehicle] = true;
  1221.         SendClientMessage(playerid, COLOR_GREY, "[USAGE]: /vehicle[Vehname/Vehicleid] [Color 1 (opt)] [Color 2 (opt)]");
  1222.         return 1;
  1223.     }
  1224.  
  1225.     if(PlayerInfo[playerid][pCanSpawnVehicle])
  1226.     {
  1227.         VehicleID = GetVehicleModelIDFromName(Vehicle);
  1228.         if(VehicleID != 425 && VehicleID != 432 && VehicleID != 447 &&
  1229.            VehicleID != 430 && VehicleID != 417 && VehicleID != 435 &&
  1230.            VehicleID != 446 && VehicleID != 449 && VehicleID != 450 &&
  1231.            VehicleID != 452 && VehicleID != 453 && VehicleID != 454 &&
  1232.            VehicleID != 460 && VehicleID != 464 && VehicleID != 465 &&
  1233.            VehicleID != 469 && VehicleID != 472 && VehicleID != 473 &&
  1234.            VehicleID != 476 && VehicleID != 484 && VehicleID != 487 &&
  1235.            VehicleID != 488 && VehicleID != 493 && VehicleID != 497 &&
  1236.            VehicleID != 501 && VehicleID != 511 && VehicleID != 512 &&
  1237.            VehicleID != 513 && VehicleID != 519 && VehicleID != 520 &&
  1238.            VehicleID != 537 && VehicleID != 538 && VehicleID != 548 &&
  1239.            VehicleID != 553 && VehicleID != 563 && VehicleID != 564 &&
  1240.            VehicleID != 569 && VehicleID != 570 && VehicleID != 577 &&
  1241.            VehicleID != 584 && VehicleID != 590 && VehicleID != 591 &&
  1242.            VehicleID != 592 && VehicleID != 593 && VehicleID != 594 &&
  1243.            VehicleID != 595 && VehicleID != 606 && VehicleID != 607 &&
  1244.            VehicleID != 608 && VehicleID != 610 && VehicleID != 611) {
  1245.             if(VehicleID == -1 )
  1246.             {
  1247.                 VehicleID = strval(Vehicle);
  1248.  
  1249.                 if(VehicleID < 400 || VehicleID > 611 )
  1250.                 {
  1251.                     return SendClientMessage(playerid, COLOR_GREY, "You entered an invalid vehiclename!");
  1252.                 }
  1253.             }
  1254.  
  1255.             GetPlayerPos(playerid, pX, pY, pZ);
  1256.             GetPlayerFacingAngle(playerid, pAngle);
  1257.  
  1258.             DestroyVehicle(PlayerInfo[playerid][pSpawnVehicle]);
  1259.             PlayerInfo[playerid][pSpawnVehicle] = CreateVehicle(VehicleID, pX, pY, pZ+2.0, pAngle, ColorOne, ColorTwo, -1);
  1260.             LinkVehicleToInterior(PlayerInfo[playerid][pSpawnVehicle], GetPlayerInterior(playerid));
  1261.             PutPlayerInVehicle(playerid, PlayerInfo[playerid][pSpawnVehicle], 0);
  1262.             SendClientMessage(playerid, COLOR_GREY, "You succesfully spawned this vehicle!");
  1263.         } else {
  1264.             SendClientMessage(playerid, COLOR_GREY, "You are not allowed to spawn this vehicle!!");
  1265.         }
  1266.     } else {
  1267.         SendClientMessage(playerid, COLOR_GREY, "You can not spawn vehicles in this zone!");
  1268.     }
  1269.     return 1;
  1270. }
  1271.  
  1272.  
  1273. stock PlayerName(playerid) {
  1274.     new name[255];
  1275.     GetPlayerName(playerid, name, 255);
  1276.     return name;
  1277. }
  1278.  
  1279. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  1280. {
  1281.     SendClientMessage(playerid, COLOR_YELLOW, "You can listen to your vehicle radio with /radio");
  1282.     return 1;
  1283. }
  1284.  
  1285. public OnPlayerExitVehicle(playerid, vehicleid)
  1286. {
  1287.     StopAudioStreamForPlayer(playerid);
  1288.     return 1;
  1289. }
  1290.  
  1291.  
  1292. public OnPlayerText(playerid, text[])
  1293. {
  1294.     new pname[MAX_PLAYER_NAME], str[128];
  1295.     GetPlayerName(playerid, pname, sizeof(pname));
  1296.     format(str, sizeof(str), "%s says: %s", pname, text);
  1297.     ProxDetector(30.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
  1298.     return 0;
  1299. }
  1300.  
  1301.  
  1302. public OnPlayerStateChange(playerid, newstate, oldstate)
  1303. {
  1304.      if(newstate == PLAYER_STATE_PASSENGER) {
  1305.          for(new i = 0; i < sizeof(uberhaxeddbweps); i++) {
  1306.              if(GetPlayerWeapon(playerid) == uberhaxeddbweps[i]) SetPlayerArmedWeapon(playerid, 1);
  1307.              else
  1308.              {
  1309.                  SetPlayerArmedWeapon(playerid, smgs[i]);
  1310.              }
  1311.          }
  1312.     }
  1313.     if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
  1314.     {
  1315.         if(IsBeingSpeced[playerid] == 1)
  1316.         {
  1317.             foreach(Player,i)
  1318.             {
  1319.                 if(spectatorid[i] == playerid)
  1320.                 {
  1321.                     PlayerSpectateVehicle(i, GetPlayerVehicleID(playerid));
  1322.                 }
  1323.             }
  1324.         }
  1325.     }
  1326.     if(newstate == PLAYER_STATE_ONFOOT)
  1327.     {
  1328.         if(IsBeingSpeced[playerid] == 1)
  1329.         {
  1330.             foreach(Player,i)
  1331.             {
  1332.                 if(spectatorid[i] == playerid)
  1333.                 {
  1334.                     PlayerSpectatePlayer(i, playerid);
  1335.                 }
  1336.             }
  1337.         }
  1338.     }
  1339.     return 1;
  1340. }
  1341.  
  1342. public OnPlayerEnterCheckpoint(playerid)
  1343. {
  1344.     return 1;
  1345. }
  1346.  
  1347. public OnPlayerLeaveCheckpoint(playerid)
  1348. {
  1349.     return 1;
  1350. }
  1351.  
  1352. public OnPlayerEnterRaceCheckpoint(playerid)
  1353. {
  1354.     return 1;
  1355. }
  1356.  
  1357. public OnPlayerLeaveRaceCheckpoint(playerid)
  1358. {
  1359.     return 1;
  1360. }
  1361.  
  1362. public OnRconCommand(cmd[])
  1363. {
  1364.     return 1;
  1365. }
  1366.  
  1367. public OnPlayerRequestSpawn(playerid)
  1368. {
  1369.     return 1;
  1370. }
  1371.  
  1372. public OnObjectMoved(objectid)
  1373. {
  1374.     return 1;
  1375. }
  1376.  
  1377. public OnPlayerObjectMoved(playerid, objectid)
  1378. {
  1379.     return 1;
  1380. }
  1381.  
  1382. public OnPlayerPickUpPickup(playerid, pickupid)
  1383. {
  1384.     return 1;
  1385. }
  1386.  
  1387. public OnVehicleMod(playerid, vehicleid, componentid)
  1388. {
  1389.     return 1;
  1390. }
  1391.  
  1392. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1393. {
  1394.     return 1;
  1395. }
  1396.  
  1397. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1398. {
  1399.     return 1;
  1400. }
  1401.  
  1402. public OnPlayerSelectedMenuRow(playerid, row)
  1403. {
  1404.     return 1;
  1405. }
  1406.  
  1407. public OnPlayerExitedMenu(playerid)
  1408. {
  1409.     return 1;
  1410. }
  1411.  
  1412. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  1413. {
  1414.     if(IsBeingSpeced[playerid] == 1)
  1415.     {
  1416.         foreach(Player,i)
  1417.         {
  1418.             if(spectatorid[i] == playerid)
  1419.             {
  1420.                 SetPlayerInterior(i,GetPlayerInterior(playerid));
  1421.                 SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(playerid));
  1422.             }
  1423.         }
  1424.     }
  1425.     return 1;
  1426. }
  1427.  
  1428. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1429. {
  1430.     return 1;
  1431. }
  1432.  
  1433. public OnRconLoginAttempt(ip[], password[], success)
  1434. {
  1435.     return 1;
  1436. }
  1437.  
  1438. public OnPlayerUpdate(playerid)
  1439. {
  1440.     return 1;
  1441. }
  1442.  
  1443. public OnPlayerStreamIn(playerid, forplayerid)
  1444. {
  1445.     return 1;
  1446. }
  1447.  
  1448. public OnPlayerStreamOut(playerid, forplayerid)
  1449. {
  1450.     return 1;
  1451. }
  1452.  
  1453. public OnVehicleStreamIn(vehicleid, forplayerid)
  1454. {
  1455.     return 1;
  1456. }
  1457.  
  1458. public OnVehicleStreamOut(vehicleid, forplayerid)
  1459. {
  1460.     return 1;
  1461. }
  1462.  
  1463. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  1464. {
  1465.     switch(dialogid)
  1466.     {
  1467.         case 11:
  1468.         {
  1469.             if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not select a location!");
  1470.             switch(listitem)
  1471.             {
  1472.                 case 0:
  1473.                 {
  1474.                     if (PlayerInfo[playerid][pDM] == 1)
  1475.                     {
  1476.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1477.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1478.                     } else {
  1479.                     SendClientMessage(playerid, COLOR_YELLOW, "You are now in dm arena, only way to getout is /kill !!");
  1480.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1481.                     PlayerInfo[playerid][pDM] = 1;
  1482.                     }
  1483.                     return 1;
  1484.                 }
  1485.                 case 1:
  1486.                 {
  1487.                     if (PlayerInfo[playerid][pDM] == 1)
  1488.                     {
  1489.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1490.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1491.                     } else {
  1492.                     SendClientMessage(playerid, COLOR_YELLOW , "You have been teleported to the hydras zone!");
  1493.                     SetPlayerPos(playerid, 1954.0288,-2608.4131,13.5469);
  1494.                     }
  1495.                     return 1;
  1496.                 }
  1497.                 case 2:
  1498.                 {
  1499.                     if (PlayerInfo[playerid][pDM] == 1)
  1500.                     {
  1501.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1502.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1503.                     } else {
  1504.                     SendClientMessage(playerid, COLOR_YELLOW , "You have been teleported to the hunters zone!");
  1505.                     SetPlayerPos(playerid, 1917.6460,-2435.8284,13.5391);
  1506.                     }
  1507.                     return 1;
  1508.                 }
  1509.             }
  1510.         }
  1511.     }
  1512.     switch(dialogid)
  1513.     {
  1514.         case 10:
  1515.         {
  1516.             switch(listitem)
  1517.             {
  1518.                 case 0:
  1519.                 {
  1520.                     if (PlayerInfo[playerid][pDM] == 1)
  1521.                     {
  1522.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1523.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1524.                     } else {
  1525.                     SendClientMessage(playerid, COLOR_YELLOW , "You are now playing in as Police Officer Army Are Allys With You");
  1526.                     pTeam[playerid] = team_lspd;
  1527.                     SetPlayerSkin(playerid, 280);
  1528.                     SetPlayerPos(playerid, 1536.9590,-1676.0010,13.3828);
  1529.                     GameTextForPlayer(playerid, "~g~Welcome to the Police, Army Are Allys With You", 3000, 5);
  1530.                     }
  1531.                     return 1;
  1532.                 }
  1533.                 case 1:
  1534.                 {
  1535.                     if (PlayerInfo[playerid][pDM] == 1)
  1536.                     {
  1537.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1538.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1539.                     } else {
  1540.                     SendClientMessage(playerid, COLOR_YELLOW , "You are playing in as a Army Guard, Cops Are Allys With You!");
  1541.                     pTeam[playerid] = team_army;
  1542.                     SetPlayerSkin(playerid, 287);
  1543.                     SetPlayerPos(playerid, 2747.4990,-2431.9531,13.6432);
  1544.                     GameTextForPlayer(playerid, "~g~Welcome to the Army, Cops Are Allys With You", 3000, 5);
  1545.                     }
  1546.                     return 1;
  1547.                 }
  1548.                 case 2:
  1549.                 {
  1550.                     if (PlayerInfo[playerid][pDM] == 1)
  1551.                     {
  1552.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1553.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1554.                     } else {
  1555.                     SendClientMessage(playerid, COLOR_YELLOW , "You are now playing in as a Balla Gangster!");
  1556.                     pTeam[playerid] = team_balla;
  1557.                     SetPlayerPos(playerid, 2342.3667,-1410.1563,23.8190);
  1558.                     SetPlayerSkin(playerid, 104);
  1559.                     GameTextForPlayer(playerid, "~g~Welcome to the Ballas", 3000, 5);
  1560.                     }
  1561.                     return 1;
  1562.                 }
  1563.                 case 3:
  1564.                 {
  1565.                     if (PlayerInfo[playerid][pDM] == 1)
  1566.                     {
  1567.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1568.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1569.                     } else {
  1570.                     SendClientMessage(playerid, COLOR_YELLOW , "You are playing in as a Groove Street Gangster !");
  1571.                     pTeam[playerid] = team_groove;
  1572.                     SetPlayerSkin(playerid, 107);
  1573.                     SetPlayerPos(playerid, 2488.4053,-1669.9097,13.3359);
  1574.                     GameTextForPlayer(playerid, "~g~Welcome to the Groove St. Families", 3000, 5);
  1575.                     }
  1576.                     return 1;
  1577.                 }
  1578.                 case 4:
  1579.                 {
  1580.                     if (PlayerInfo[playerid][pDM] == 1)
  1581.                     {
  1582.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1583.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1584.                     } else {
  1585.                     SendClientMessage(playerid, COLOR_YELLOW , "You are playing in as a Vagos Gangster !");
  1586.                     pTeam[playerid] = team_vagos;
  1587.                     SetPlayerSkin(playerid, 108);
  1588.                     SetPlayerPos(playerid, 2352.0803,-1166.7577,27.5005);
  1589.                     GameTextForPlayer(playerid, "~g~Welcome to the Vagos", 3000, 5);
  1590.                     }
  1591.                     return 1;
  1592.                 }
  1593.                 case 5:
  1594.                 {
  1595.                     if (PlayerInfo[playerid][pDM] == 1)
  1596.                     {
  1597.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1598.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1599.                     } else {
  1600.                     SendClientMessage(playerid, COLOR_YELLOW , "You are playing in as a Aztecas Gangster !");
  1601.                     pTeam[playerid] = team_aztecas;
  1602.                     SetPlayerSkin(playerid, 115);
  1603.                     SetPlayerPos(playerid, 2661.9253,-1092.7109,69.4967);
  1604.                     GameTextForPlayer(playerid, "~g~Welcome to the Aztecas", 3000, 5);
  1605.                     }
  1606.                     return 1;
  1607.                 }
  1608.                 case 6:
  1609.                 {
  1610.                     if (PlayerInfo[playerid][pDM] == 1)
  1611.                     {
  1612.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1613.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1614.                     } else {
  1615.                     SendClientMessage(playerid, COLOR_YELLOW , "You are playing in as a Mafia !");
  1616.                     pTeam[playerid] = team_mafia;
  1617.                     SetPlayerSkin(playerid, 126);
  1618.                     SetPlayerPos(playerid, 1567.7882,-1891.3816,13.5593);
  1619.                     GameTextForPlayer(playerid, "~g~Welcome to the Chinese Mafia", 3000, 5);
  1620.                     }
  1621.                     return 1;
  1622.                 }
  1623.                 case 7:
  1624.                 {
  1625.                     if (PlayerInfo[playerid][pDM] == 1)
  1626.                     {
  1627.                     SendClientMessage(playerid, COLOR_YELLOW, "You can't tp out of DM arena, YOU SHALL DIE !!");
  1628.                     SetPlayerPos(playerid,596.09997559,-3090.10009766,57.29999924);
  1629.                     } else {
  1630.                     SendClientMessage(playerid, COLOR_YELLOW , "You are now playing in as Civilian !");
  1631.                     pTeam[playerid] = team_civ;
  1632.                     SetPlayerSkin(playerid, 188);
  1633.                     SetPlayerPos(playerid, 1536.9590,-1676.0010,13.3828);
  1634.                     GameTextForPlayer(playerid, "~g~Welcome to the Civilians", 3000, 5);
  1635.                     }
  1636.                     return 1;
  1637.                 }
  1638.             }
  1639.         }
  1640.     }
  1641.     //Dialog for Radio System
  1642.     switch(dialogid)
  1643.     {
  1644.         case 9998:
  1645.         {
  1646.             if(!response) return SendClientMessage(playerid, 0xFF330000, "You did not select a station!");
  1647.             switch(listitem)
  1648.             {
  1649.                 case 0:
  1650.                 {
  1651.                     new vehid = GetPlayerVehicleID(playerid);
  1652.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1653.                     {
  1654.                         if(IsPlayerInVehicle(i, vehid))
  1655.                         {
  1656.                             PlayAudioStreamForPlayer(i, "http://193.108.24.18:8000/thevoice.m3u");
  1657.                             SendClientMessage(i, 0xFF330000, "Now Playing: Radio The Voice");
  1658.                         }
  1659.                     }
  1660.                     return 1;
  1661.                 }
  1662.                 case 1:
  1663.                 {
  1664.                     new vehid = GetPlayerVehicleID(playerid);
  1665.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1666.                     {
  1667.                         if(IsPlayerInVehicle(i, vehid))
  1668.                         {
  1669.                             PlayAudioStreamForPlayer(i, "http://radioreklama.bg/live_mp3.pls");
  1670.                             SendClientMessage(i, 0xFF330000, "Now Playing: Radio City");
  1671.                         }
  1672.                     }
  1673.                     return 1;
  1674.                 }
  1675.                 case 2:
  1676.                 {
  1677.                     new vehid = GetPlayerVehicleID(playerid);
  1678.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1679.                     {
  1680.                         if(IsPlayerInVehicle(i, vehid))
  1681.                         {
  1682.                             PlayAudioStreamForPlayer(i, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=118452");
  1683.                             SendClientMessage(i, 0xFF330000, "Now Playing: Radio Massive Dubstep");
  1684.                         }
  1685.                     }
  1686.                     return 1;
  1687.                 }
  1688.                 case 3:
  1689.                 {
  1690.                     new vehid = GetPlayerVehicleID(playerid);
  1691.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1692.                     {
  1693.                         if(IsPlayerInVehicle(i, vehid))
  1694.                         {
  1695.                             PlayAudioStreamForPlayer(i, "http://stream-02.radiotangra.com/Tangra-high.m3u");
  1696.                             SendClientMessage(i, 0xFF330000, "Now Playing: Radio Tangra Mega Rock");
  1697.                         }
  1698.                     }
  1699.                     return 1;
  1700.                 }
  1701.                 case 4:
  1702.                 {
  1703.                     new vehid = GetPlayerVehicleID(playerid);
  1704.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1705.                     {
  1706.                         if(IsPlayerInVehicle(i, vehid))
  1707.                         {
  1708.                             PlayAudioStreamForPlayer(i, "http://www.radioveronika.bg/veronika.m3u");
  1709.                             SendClientMessage(i, 0xFF330000, "Now Playing: Radio Veronika");
  1710.                         }
  1711.                     }
  1712.                     return 1;
  1713.                 }
  1714.                 case 5:
  1715.                 {
  1716.                     new vehid = GetPlayerVehicleID(playerid);
  1717.                     for(new i = 0; i<MAX_PLAYERS; i++)
  1718.                     {
  1719.                         if(IsPlayerInVehicle(i, vehid))
  1720.                         {
  1721.                             PlayAudioStreamForPlayer(i, "http://allstyleradio.cloudspeaker.fm/allstyleradio.pls");
  1722.                             SendClientMessage(i, 0xFF330000, "Now Playing: Server's Offical Radio");
  1723.                         }
  1724.                     }
  1725.                     return 1;
  1726.                 }
  1727.             }
  1728.         }
  1729.     }
  1730.     switch(dialogid) //switching to dialogid
  1731.     { //opening barrel
  1732.         case DIALOG_REGISTER: //for registering
  1733.         { //opening barrel
  1734.             if(response)
  1735.             { //opening barrel
  1736.                 new
  1737.                     strText[179], naslov2[128]; //some variables for text that player type and title
  1738.  
  1739.                 if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35) //if player type password more than 4 and less than 35 characters he will get this
  1740.                 { //opening barrel
  1741.                     OnPlayerRegister(playerid, inputtext); //Loading stats
  1742.  
  1743.                     format(strText, 125, "You have registered with name {FFFFFF}'%s' {FFFF00}and password {FFFFFF}'%s'{FFFF00}, you are automatic logged in!", GetName(playerid), inputtext); //formating our text
  1744.                     SendClientMessage(playerid, COLOR_YELLOW, strText); //send client message
  1745.                 } //closing barrel
  1746.                 else // else if je type less than 4 or more than 35 characters he will get this
  1747.                 { //opening barrel
  1748.                     format(naslov2, sizeof(naslov2), ""COL_GREEN2"     Welcome"COL_WHITE" %s!", GetName(playerid)); //formating our title
  1749.                     format(strText, 179, ""COL_WHITE"______________________________\n\n"COL_GREEN2"Name"COL_WHITE" %s"COL_GREEN2" isn't registered!\n\n{F81414}Password must be between 4 and 35 characters!", GetName(playerid)); //formating our text
  1750.                     ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, naslov2, strText, "Register", "Exit"); //show player again dialog for registering
  1751.                 } //closing barrel
  1752.             } //closing barrel
  1753.             else Kick(playerid); //if player choose Exit button, server will kick him, this is for response :D
  1754.         } //closing barrel
  1755.  
  1756.         case DIALOG_LOGIN: //for loging
  1757.         { //opening barrel
  1758.             if(response)
  1759.             { //opening barrel
  1760.                 new
  1761.                     strText[179], naslov2[128]; //some variables for text that player type and title
  1762.  
  1763.                 if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35) //if player type password more than 4 or less than 35 characters he will get this
  1764.                 { //opening barrel
  1765.                     OnPlayerLogin(playerid, inputtext); //loading stats
  1766.                 } //closing barrel
  1767.                 else //but if he type less than 4 or more than 35 characters he will get this
  1768.                 { //opening barrel
  1769.                     format(naslov2, sizeof(naslov2), ""COL_GREEN2"     Welcome"COL_WHITE" %s!", GetName(playerid)); //formating our title
  1770.                     format(strText, 179, ""COL_WHITE"______________________________\n\n"COL_GREEN2"Name"COL_WHITE" %s"COL_GREEN2" is registered!\n\n{F81414}You typed wrong password!", GetName(playerid)); //formating our text
  1771.                     ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, naslov2, strText, "Login", "Exit"); //showing palyer again dialog for login
  1772.                 } //closing barrel
  1773.             } //closing barrel
  1774.             else Kick(playerid);
  1775.         }
  1776.     }
  1777.     return 1;
  1778. }
  1779.  
  1780. stock GetPlayerNameEx(playerid) {
  1781.  
  1782.     new
  1783.     sz_playerName[MAX_PLAYER_NAME],
  1784.     i_pos;
  1785.  
  1786.     GetPlayerName(playerid, sz_playerName, MAX_PLAYER_NAME);
  1787.     while ((i_pos = strfind(sz_playerName, "_", false, i_pos)) != -1) sz_playerName[i_pos] = ' ';
  1788.     return sz_playerName;
  1789. }
  1790.  
  1791. ProxDetector(Float:radi, playerid, string[], col1, col2, col3, col4, col5)
  1792. {
  1793.     new Float:pPositionX[3], Float:oPositionX[3];
  1794.     GetPlayerPos(playerid, pPositionX[0], pPositionX[1], pPositionX[2]);
  1795.     foreach(Player, i)
  1796.     {
  1797.         GetPlayerPos(i, oPositionX[0], oPositionX[1], oPositionX[2]);
  1798.         if(IsPlayerInRangeOfPoint(i, radi / 16, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col1, string); }
  1799.         else if(IsPlayerInRangeOfPoint(i, radi / 8, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col2, string); }
  1800.         else if(IsPlayerInRangeOfPoint(i, radi / 4, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col3, string); }
  1801.         else if(IsPlayerInRangeOfPoint(i, radi / 2, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col4, string); }
  1802.         else if(IsPlayerInRangeOfPoint(i, radi, pPositionX[0], pPositionX[1], pPositionX[2])) { SendClientMessage(i, col5, string); }
  1803.     }
  1804.     return 1;
  1805. }
  1806.  
  1807. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  1808. {
  1809.     return 1;
  1810. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement