Advertisement
Guest User

Herpderpscript

a guest
Jul 21st, 2012
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 276.65 KB | None | 0 0
  1. //================================[INCLUDES]====================================
  2. #include <a_samp>
  3. #include <YSI\y_ini>
  4. #include <zcmd>
  5. #include <foreach>
  6. //================================[DEFINES]=====================================
  7. #define PRESSED(%0) \
  8. (((newkeys&(%0))==(%0)) && ((oldkeys & (%0)) != (%0)))
  9. #define PATH "/Users/%s.ini"
  10. //=========================DEALERSHIP SETTINGS==================================
  11. #undef MAX_PLAYERS
  12. #define MAX_PLAYERS 100
  13. #define MAX_DVEHICLES 200
  14. #define MAX_DEALERSHIPS 10
  15. #define MAX_FUEL_STATIONS 10
  16. #define VEHICLE_File_PATH "DSHIP/Vehicles/"
  17. #define DEALERSHIP_File_PATH "DSHIP/Dealerships/"
  18. #define FUEL_STATION_File_PATH "DSHIP/FuelStations/"
  19. #define MAX_PLAYER_VEHICLES 3
  20. #define FUEL_PRICE 5
  21. #define GAS_CAN_PRICE 500
  22. #define ALARM_TIME 10000 // alarm duration in milliseconds (1 second = 1000 milliseconds)
  23. #define DEFAULT_NUMBER_PLATE "123 ABC"
  24. #define VEHICLE_DEALERSHIP 1
  25. #define VEHICLE_PLAYER 2
  26. #define DIALOG_NONE 12345
  27. #define DIALOG_ERROR 12346
  28. #define DIALOG_VEHICLE 500
  29. #define DIALOG_VEHICLE_BUY 501
  30. #define DIALOG_VEHICLE_SELL 502
  31. #define DIALOG_FINDVEHICLE 503
  32. #define DIALOG_TRUNK 504
  33. #define DIALOG_TRUNK_ACTION 505
  34. #define DIALOG_VEHICLE_PLATE 507
  35. #define DIALOG_FUEL 510
  36. #define DIALOG_EDITVEHICLE 606
  37. #define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
  38. #define ShowErrorDialog(%1,%2) ShowPlayerDialog(%1, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ERROR", %2, "OK", "")
  39. //==============================[COLORS DEFINES]================================
  40. #define ResetMoneyBar ResetPlayerMoney
  41. #define UpdateMoneyBar GivePlayerMoney
  42. #define SCM SendClientMessage
  43. #define LIGHTBLUE "{00CED1}"
  44. #define ALB "{ffffff}"
  45. #define RED "{F81414}"
  46. #define GREEN "{00FF22}"
  47. #define COLOR_GREY 0xAFAFAFAA
  48. #define COLOR_GRAD1 0xFFFFFFFF
  49. #define COLOR_PURPLE 0xC2A2DAAA
  50. #define COLOR_LIGHTRED 0xFF6347AA
  51. #define COLOR_BLUE 0x2641FEAA
  52. #define COLOR_FADE1 0xE6E6E6E6
  53. #define COLOR_FADE2 0xC8C8C8C8
  54. #define COLOR_FADE3 0xAAAAAAAA
  55. #define COLOR_FADE4 0x8C8C8C8C
  56. #define COLOR_YELLOW3 0xFFFF00FF
  57. #define COLOR_FADE5 0x6E6E6E6E
  58. #define COLOR_WHITE 0xFFFFFFAA
  59. #define COLOR_CHAT1 0xF9B7FFAA
  60. #define COLOR_CHAT2 0xE6A9ECAA
  61. #define COLOR_CHAT3 0xC38EC7AA
  62. #define COLOR_CHAT4 0xD2B9D3AA
  63. #define COLOR_CHAT5 0xC6AEC7AA
  64. #define COLOR_GRAD2 0xBFC0C2FF
  65. #define COLOR_YELLOW 0xFFFF00AA
  66. #define COLOR_YELLOW2 0xF5DEB3AA
  67. #define COLOR_GOLD 0xF6C861AA
  68. #define COLOR_DBLUE 0x2641FEAA
  69. #define COLOR_OOC 0xE0FFFFAA
  70. #define PURPLE "{7A378B}"
  71. #define COLOR_GREEN 0x008000FF
  72. #define COLOR_LIGHTBLUE 0xADD8E6FF
  73. #define COLOR_RED 0xFF0000FF
  74. #define COLOR_LIGHTGREEN 0x9ACD32AA
  75. #define CYELLOW "{9DBD1E}"
  76. #define CORANGE "{E68C0E}"
  77. #define CBLUE "{39AACC}"
  78. #define CDGREEN "{6FA828}"
  79. #define CWHITE "{FFFFFF}"
  80. #define CRED "{FF0000}"
  81. #define COBJS1 "{D0A5D1}"
  82. #define COBJS2 "{8FC95F}"
  83. #define CSALMON "{FA8072}"
  84. #define COL_WHITE "{FFFFFF}"
  85. #define COL_RED "{F81414}"
  86. #define COL_GREEN "{00FF22}"
  87. #define COL_LIGHTBLUE "{00CED1}"
  88. //=====================================[FORWARDS]===============================
  89. forward SetPlayerSpawn(playerid);
  90. forward ShowStats(playerid,targetid);
  91. forward Payday();
  92. forward SyncTime();
  93. forward SetPlayerUnMute();
  94. forward ScoreUpdate();
  95. forward FixHour(hour);
  96. forward newbietimer();
  97. forward Unfreeze(playerid);
  98. forward SendAdminMessage(color, string[]);
  99. forward ABroadCast(color,const string[],level);
  100. forward TBroadCast(color,const string[], level);
  101. forward SendTesterMessage(color, string[]);
  102. forward RACtime(playerid);
  103. forward ClearChatboxToAll(playerid, lines);
  104. forward ClearChatboxToAll2(playerid, lines);
  105. forward OOCOff(color,const string[]);
  106. forward ProxDetectorS(Float:radi, playerid, targetid);
  107. forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
  108. forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
  109. forward split(const strsrc[], strdest[][], delimiter);
  110. forward SetOriginalColor(playerid);
  111. OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  112. {
  113. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  114. }
  115. LoopingAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
  116. {
  117. ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
  118. }
  119. //==================================DEALERSHIP==================================
  120. forward MainTimer();
  121. forward SaveTimer();
  122. forward StopAlarm(vehicleid);
  123. //===================================ENGINE=====================================
  124. forward StartEngine(playerid);
  125. forward DamagedEngine(playerid);
  126. new reg1[ ] = "This is a RolePlay server.\n{FFFFFF}DM {F81414}isn't allowed {FFFFFF}You may only kill if you have a good RP reason.\n",
  127. reg2[ ] = "When you start to play you must know the basic rules.\nFor that is the next {F81414}tutorial.\n\n",
  128. reg3[ ] = "•Cheats or Bug Abuse is forbidden, you will end up with {F81414}Ban PERMANENT.\n",
  129. reg4[ ] = "•Keep a decent {F81414}language {FFFFFF}on the server.\n",
  130. reg5[ ] = "•Spamming will lead you to {F81414}mute/kick.\n",
  131. reg6[ ] = "•DriveBy isn't allowed, only with a {F81414}good {FFFFFF}RP reason.\n",
  132. reg7[ ] = "•Remember, ALWAYS RolePlay.\n",
  133. reg8[ ] = "\n\n{F81414}Zodiac Gaming Roleplay {F3FF02}wishes you good luck!";
  134. //==================================[ENUMS]=====================================
  135. enum pInfo
  136. {
  137. pPass,
  138. pLevel,
  139. pSex,
  140. pAge,
  141. pOrigin,
  142. pPlace,
  143. pCash,
  144. pExp,
  145. pAdmin,
  146. pNumber,
  147. pTester,
  148. pWarns,
  149. pSelected,
  150. pMuted,
  151. pMuteTime,
  152. pFirstJoined,
  153. pModel,
  154. pVip,
  155. pSpawn,
  156. pLocked,
  157. pDriveLic,
  158. };
  159. new PlayerInfo[MAX_PLAYERS][pInfo];
  160. forward LoadUser_data(playerid,name[],value[]);
  161. public LoadUser_data(playerid,name[],value[])
  162. {
  163. INI_Int("Password",PlayerInfo[playerid][pPass]);
  164. INI_Int("Level",PlayerInfo[playerid][pLevel]);
  165. INI_Int("Cash",PlayerInfo[playerid][pCash]);
  166. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  167. INI_Int("Age",PlayerInfo[playerid][pAge]);
  168. INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
  169. INI_Int("Sex",PlayerInfo[playerid][pSex]);
  170. INI_Int("Model",PlayerInfo[playerid][pModel]);
  171. INI_Int("DriveLic",PlayerInfo[playerid][pDriveLic]);
  172. INI_Int("Place",PlayerInfo[playerid][pPlace]);
  173. INI_Int("Exp",PlayerInfo[playerid][pExp]);
  174. INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
  175. INI_Int("Number",PlayerInfo[playerid][pNumber]);
  176. INI_Int("Tester",PlayerInfo[playerid][pTester]);
  177. INI_Int("Warns",PlayerInfo[playerid][pWarns]);
  178. INI_Int("Selected",PlayerInfo[playerid][pSelected]);
  179. INI_Int("Muted",PlayerInfo[playerid][pMuted]);
  180. INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
  181. INI_Int("FirstJoined",PlayerInfo[playerid][pFirstJoined]);
  182. INI_Int("Vip",PlayerInfo[playerid][pVip]);
  183. INI_Int("Spawn",PlayerInfo[playerid][pSpawn]);
  184. INI_Int("Locked",PlayerInfo[playerid][pLocked]);
  185. return 1;
  186. }
  187. stock UserPath(playerid)
  188. {
  189. new string[128],playername[MAX_PLAYER_NAME];
  190. GetPlayerName(playerid,playername,sizeof(playername));
  191. format(string,sizeof(string),PATH,playername);
  192. return string;
  193. }
  194.  
  195. stock udb_hash(buf[]) { // Credits to DracoBlue
  196. new length=strlen(buf);
  197. new s1 = 1;
  198. new s2 = 0;
  199. new n;
  200. for (n=0; n<length; n++)
  201. {
  202. s1 = (s1 + buf[n]) % 65521;
  203. s2 = (s2 + s1) % 65521;
  204. }
  205. return (s2 << 16) + s1;
  206. }
  207. //==============================[SYMBOLS MAX_PLAYERS]===========================
  208. new gPlayerLogged[MAX_PLAYERS];
  209. new gPlayerLogTries[MAX_PLAYERS];
  210. new ntimer[MAX_PLAYERS];
  211. new PlayerNeedsHelp[MAX_PLAYERS];
  212. new Mobile[MAX_PLAYERS];
  213. new RingTone[MAX_PLAYERS];
  214. new CellTime[MAX_PLAYERS];
  215. new gPlayerRegStep[MAX_PLAYERS];
  216. new AdminDuty[MAX_PLAYERS];
  217. //========================================[DMV]=================================
  218. new dmvc;
  219. new dmvc1;
  220. new dmvc2;
  221. new CP[MAX_PLAYERS];
  222. new TakingLesson[MAX_PLAYERS];
  223. //==============================================================================
  224. new TesterDuty[MAX_PLAYERS];
  225. new gPlayerTutorialing[MAX_PLAYERS];
  226. new gOoc[MAX_PLAYERS];
  227. new BigEar[MAX_PLAYERS];
  228. new Text:Textdraw98[MAX_PLAYERS];
  229. //==================================[SYMBOLS AMMOUNT]===========================
  230. new Menu:Paper;
  231. new Menu:Paper2;
  232. new levelcost = 25000;
  233. new noooc = 1;
  234. new realchat = 1;
  235. new levelexp = 4;
  236. new ghour = 0;
  237. new gminute = 0;
  238. new gsecond = 0;
  239. new realtime = 1;
  240. new timeshift = -1;
  241. new ScoreOld;
  242. new shifthour;
  243. //==========================================Ajail===============================
  244. new JailTimer[MAX_PLAYERS], //the timer for the releasing of the player from jail
  245. bool:inJail[MAX_PLAYERS];
  246. //=========================================DEALERSHIP=================================================================
  247. new SaveVehicleIndex;
  248. new RefuelTime[MAX_PLAYERS];
  249. new TrackCar[MAX_PLAYERS];
  250. new Float:Fuel[MAX_VEHICLES] = {100.0, ...};
  251. new VehicleSecurity[MAX_VEHICLES];
  252. new VehicleCreated[MAX_DVEHICLES];
  253. new VehicleID[MAX_DVEHICLES];
  254. new VehicleModel[MAX_DVEHICLES];
  255. new Float:VehiclePos[MAX_DVEHICLES][4];
  256. new VehicleColor[MAX_DVEHICLES][2];
  257. new VehicleInterior[MAX_DVEHICLES];
  258. new VehicleWorld[MAX_DVEHICLES];
  259. new VehicleOwner[MAX_DVEHICLES][MAX_PLAYER_NAME];
  260. new VehicleNumberPlate[MAX_DVEHICLES][16];
  261. new VehicleValue[MAX_DVEHICLES];
  262. new VehicleTrunk[MAX_DVEHICLES][5][2];
  263. new VehicleMods[MAX_DVEHICLES][14];
  264. new VehiclePaintjob[MAX_DVEHICLES] = {255, ...};
  265. new Text3D:VehicleLabel[MAX_DVEHICLES];
  266. new DealershipCreated[MAX_DEALERSHIPS];
  267. new Float:DealershipPos[MAX_DEALERSHIPS][3];
  268. new Text3D:DealershipLabel[MAX_DEALERSHIPS];
  269. new FuelStationCreated[MAX_FUEL_STATIONS];
  270. new Float:FuelStationPos[MAX_FUEL_STATIONS][3];
  271. new Text3D:FuelStationLabel[MAX_FUEL_STATIONS];
  272. new VehicleNames[][] = {
  273. "Landstalker","Bravura","Buffalo","Linerunner","Perennial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
  274. "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
  275. "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
  276. "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
  277. "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
  278. "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR3 50","Walton","Regina",
  279. "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
  280. "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer A","Hotring Racer B",
  281. "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","RoadTrain",
  282. "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
  283. "Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
  284. "Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
  285. "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
  286. "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer A","Emperor",
  287. "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car (LSPD)","Police Car (SFPD)",
  288. "Police Car (LVPD)","Police Ranger","Picador","S.W.A.T. Van","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer A","Luggage Trailer B",
  289. "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
  290. };
  291. enum MainZone
  292. {
  293. Zone_Name[28],
  294. Float:Zone_Area[6]
  295. }
  296.  
  297. static const SanAndreasZones[][MainZone] = {
  298.  
  299. {"The Big Ear", {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
  300. {"Aldea Malvada", {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
  301. {"Angel Pine", {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
  302. {"Arco del Oeste", {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
  303. {"Avispa Country Club", {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
  304. {"Avispa Country Club", {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
  305. {"Avispa Country Club", {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
  306. {"Avispa Country Club", {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
  307. {"Avispa Country Club", {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
  308. {"Avispa Country Club", {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
  309. {"Back o Beyond", {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
  310. {"Battery Point", {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
  311. {"Bayside", {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
  312. {"Bayside Marina", {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
  313. {"Beacon Hill", {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
  314. {"Blackfield", {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
  315. {"Blackfield", {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
  316. {"Blackfield Chapel", {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
  317. {"Blackfield Chapel", {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
  318. {"Blackfield Intersection", {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
  319. {"Blackfield Intersection", {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
  320. {"Blackfield Intersection", {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
  321. {"Blackfield Intersection", {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
  322. {"Blueberry", {104.50,-220.10,2.30,349.60,152.20,200.00}},
  323. {"Blueberry", {19.60,-404.10,3.80,349.60,-220.10,200.00}},
  324. {"Blueberry Acres", {-319.60,-220.10,0.00,104.50,293.30,200.00}},
  325. {"Caligula's Palace", {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
  326. {"Caligula's Palace", {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
  327. {"Calton Heights", {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
  328. {"Chinatown", {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
  329. {"City Hall", {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
  330. {"Come-A-Lot", {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
  331. {"Commerce", {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
  332. {"Commerce", {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
  333. {"Commerce", {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
  334. {"Commerce", {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
  335. {"Commerce", {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
  336. {"Commerce", {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
  337. {"Conference Center", {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
  338. {"Conference Center", {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
  339. {"Cranberry Station", {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
  340. {"Creek", {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
  341. {"Dillimore", {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
  342. {"Doherty", {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
  343. {"Doherty", {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
  344. {"Downtown", {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
  345. {"Downtown", {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
  346. {"Downtown", {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
  347. {"Downtown", {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
  348. {"Downtown", {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
  349. {"Downtown", {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
  350. {"Downtown Los Santos", {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
  351. {"Downtown Los Santos", {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
  352. {"Downtown Los Santos", {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
  353. {"Downtown Los Santos", {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
  354. {"Downtown Los Santos", {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
  355. {"Downtown Los Santos", {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
  356. {"Downtown Los Santos", {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
  357. {"Downtown Los Santos", {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
  358. {"Downtown Los Santos", {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
  359. {"East Beach", {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
  360. {"East Beach", {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
  361. {"East Beach", {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
  362. {"East Beach", {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
  363. {"East Los Santos", {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
  364. {"East Los Santos", {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
  365. {"East Los Santos", {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
  366. {"East Los Santos", {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
  367. {"East Los Santos", {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
  368. {"East Los Santos", {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
  369. {"East Los Santos", {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
  370. {"Easter Basin", {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
  371. {"Easter Basin", {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
  372. {"Easter Bay Airport", {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
  373. {"Easter Bay Airport", {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
  374. {"Easter Bay Airport", {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
  375. {"Easter Bay Airport", {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
  376. {"Easter Bay Airport", {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
  377. {"Easter Bay Airport", {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
  378. {"Easter Bay Airport", {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
  379. {"Easter Bay Airport", {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
  380. {"Easter Bay Chemicals", {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
  381. {"Easter Bay Chemicals", {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
  382. {"El Castillo del Diablo", {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
  383. {"El Castillo del Diablo", {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
  384. {"El Castillo del Diablo", {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
  385. {"El Corona", {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
  386. {"El Corona", {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
  387. {"El Quebrados", {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
  388. {"Esplanade East", {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
  389. {"Esplanade East", {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
  390. {"Esplanade East", {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
  391. {"Esplanade North", {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
  392. {"Esplanade North", {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
  393. {"Esplanade North", {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
  394. {"Fallen Tree", {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
  395. {"Fallow Bridge", {434.30,366.50,0.00,603.00,555.60,200.00}},
  396. {"Fern Ridge", {508.10,-139.20,0.00,1306.60,119.50,200.00}},
  397. {"Financial", {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
  398. {"Fisher's Lagoon", {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
  399. {"Flint Intersection", {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
  400. {"Flint Range", {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
  401. {"Fort Carson", {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
  402. {"Foster Valley", {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
  403. {"Foster Valley", {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
  404. {"Foster Valley", {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
  405. {"Foster Valley", {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
  406. {"Frederick Bridge", {2759.20,296.50,0.00,2774.20,594.70,200.00}},
  407. {"Gant Bridge", {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
  408. {"Gant Bridge", {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
  409. {"Ganton", {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
  410. {"Ganton", {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
  411. {"Garcia", {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
  412. {"Garcia", {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
  413. {"Garver Bridge", {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
  414. {"Garver Bridge", {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
  415. {"Garver Bridge", {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
  416. {"Glen Park", {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
  417. {"Glen Park", {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
  418. {"Glen Park", {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
  419. {"Green Palms", {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
  420. {"Greenglass College", {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
  421. {"Greenglass College", {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
  422. {"Hampton Barns", {603.00,264.30,0.00,761.90,366.50,200.00}},
  423. {"Hankypanky Point", {2576.90,62.10,0.00,2759.20,385.50,200.00}},
  424. {"Harry Gold Parkway", {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
  425. {"Hashbury", {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
  426. {"Hilltop Farm", {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
  427. {"Hunter Quarry", {337.20,710.80,-115.20,860.50,1031.70,203.70}},
  428. {"Idlewood", {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
  429. {"Idlewood", {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
  430. {"Idlewood", {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
  431. {"Idlewood", {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
  432. {"Idlewood", {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
  433. {"Idlewood", {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
  434. {"Jefferson", {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
  435. {"Jefferson", {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
  436. {"Jefferson", {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
  437. {"Jefferson", {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
  438. {"Jefferson", {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
  439. {"Jefferson", {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
  440. {"Julius Thruway East", {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
  441. {"Julius Thruway East", {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
  442. {"Julius Thruway East", {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
  443. {"Julius Thruway East", {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
  444. {"Julius Thruway North", {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
  445. {"Julius Thruway North", {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
  446. {"Julius Thruway North", {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
  447. {"Julius Thruway North", {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
  448. {"Julius Thruway North", {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
  449. {"Julius Thruway North", {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
  450. {"Julius Thruway North", {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
  451. {"Julius Thruway North", {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
  452. {"Julius Thruway South", {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
  453. {"Julius Thruway South", {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
  454. {"Julius Thruway West", {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
  455. {"Julius Thruway West", {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
  456. {"Juniper Hill", {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
  457. {"Juniper Hollow", {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
  458. {"K.A.C.C. Military Fuels", {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
  459. {"Kincaid Bridge", {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
  460. {"Kincaid Bridge", {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
  461. {"Kincaid Bridge", {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
  462. {"King's", {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
  463. {"King's", {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
  464. {"King's", {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
  465. {"LVA Freight Depot", {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
  466. {"LVA Freight Depot", {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
  467. {"LVA Freight Depot", {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
  468. {"LVA Freight Depot", {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
  469. {"LVA Freight Depot", {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
  470. {"Las Barrancas", {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
  471. {"Las Brujas", {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
  472. {"Las Colinas", {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
  473. {"Las Colinas", {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
  474. {"Las Colinas", {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
  475. {"Las Colinas", {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
  476. {"Las Colinas", {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
  477. {"Las Colinas", {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
  478. {"Las Colinas", {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
  479. {"Las Payasadas", {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
  480. {"Las Venturas Airport", {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
  481. {"Las Venturas Airport", {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
  482. {"Las Venturas Airport", {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
  483. {"Las Venturas Airport", {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
  484. {"Last Dime Motel", {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
  485. {"Leafy Hollow", {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
  486. {"Liberty City", {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
  487. {"Lil' Probe Inn", {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
  488. {"Linden Side", {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
  489. {"Linden Station", {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
  490. {"Linden Station", {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
  491. {"Little Mexico", {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
  492. {"Little Mexico", {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
  493. {"Los Flores", {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
  494. {"Los Flores", {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
  495. {"Los Santos International", {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
  496. {"Los Santos International", {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
  497. {"Los Santos International", {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
  498. {"Los Santos International", {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
  499. {"Los Santos International", {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
  500. {"Los Santos International", {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
  501. {"Marina", {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
  502. {"Marina", {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
  503. {"Marina", {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
  504. {"Market", {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
  505. {"Market", {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
  506. {"Market", {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
  507. {"Market", {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
  508. {"Market Station", {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
  509. {"Martin Bridge", {-222.10,293.30,0.00,-122.10,476.40,200.00}},
  510. {"Missionary Hill", {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
  511. {"Montgomery", {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
  512. {"Montgomery", {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
  513. {"Montgomery Intersection", {1546.60,208.10,0.00,1745.80,347.40,200.00}},
  514. {"Montgomery Intersection", {1582.40,347.40,0.00,1664.60,401.70,200.00}},
  515. {"Mulholland", {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
  516. {"Mulholland", {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
  517. {"Mulholland", {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
  518. {"Mulholland", {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
  519. {"Mulholland", {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
  520. {"Mulholland", {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
  521. {"Mulholland", {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
  522. {"Mulholland", {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
  523. {"Mulholland", {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
  524. {"Mulholland", {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
  525. {"Mulholland", {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
  526. {"Mulholland", {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
  527. {"Mulholland", {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
  528. {"Mulholland Intersection", {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
  529. {"North Rock", {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
  530. {"Ocean Docks", {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
  531. {"Ocean Docks", {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
  532. {"Ocean Docks", {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
  533. {"Ocean Docks", {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
  534. {"Ocean Docks", {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
  535. {"Ocean Docks", {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
  536. {"Ocean Docks", {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
  537. {"Ocean Flats", {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
  538. {"Ocean Flats", {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
  539. {"Ocean Flats", {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
  540. {"Octane Springs", {338.60,1228.50,0.00,664.30,1655.00,200.00}},
  541. {"Old Venturas Strip", {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
  542. {"Palisades", {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
  543. {"Palomino Creek", {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
  544. {"Paradiso", {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
  545. {"Pershing Square", {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
  546. {"Pilgrim", {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
  547. {"Pilgrim", {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
  548. {"Pilson Intersection", {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
  549. {"Pirates in Men's Pants", {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
  550. {"Playa del Seville", {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
  551. {"Prickle Pine", {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
  552. {"Prickle Pine", {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
  553. {"Prickle Pine", {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
  554. {"Prickle Pine", {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
  555. {"Queens", {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
  556. {"Queens", {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
  557. {"Queens", {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
  558. {"Randolph Industrial", {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
  559. {"Redsands East", {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
  560. {"Redsands East", {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
  561. {"Redsands East", {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
  562. {"Redsands West", {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
  563. {"Redsands West", {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
  564. {"Redsands West", {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
  565. {"Redsands West", {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
  566. {"Regular Tom", {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
  567. {"Richman", {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
  568. {"Richman", {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
  569. {"Richman", {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
  570. {"Richman", {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
  571. {"Richman", {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
  572. {"Richman", {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
  573. {"Richman", {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
  574. {"Richman", {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
  575. {"Richman", {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
  576. {"Richman", {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
  577. {"Robada Intersection", {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
  578. {"Roca Escalante", {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
  579. {"Roca Escalante", {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
  580. {"Rockshore East", {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
  581. {"Rockshore West", {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
  582. {"Rockshore West", {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
  583. {"Rodeo", {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
  584. {"Rodeo", {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
  585. {"Rodeo", {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
  586. {"Rodeo", {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
  587. {"Rodeo", {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
  588. {"Rodeo", {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
  589. {"Rodeo", {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
  590. {"Rodeo", {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
  591. {"Rodeo", {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
  592. {"Rodeo", {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
  593. {"Rodeo", {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
  594. {"Rodeo", {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
  595. {"Royal Casino", {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
  596. {"San Andreas Sound", {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
  597. {"Santa Flora", {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
  598. {"Santa Maria Beach", {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
  599. {"Santa Maria Beach", {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
  600. {"Shady Cabin", {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
  601. {"Shady Creeks", {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
  602. {"Shady Creeks", {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
  603. {"Sobell Rail Yards", {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
  604. {"Spinybed", {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
  605. {"Starfish Casino", {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
  606. {"Starfish Casino", {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
  607. {"Starfish Casino", {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
  608. {"Temple", {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
  609. {"Temple", {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
  610. {"Temple", {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
  611. {"Temple", {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
  612. {"Temple", {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
  613. {"Temple", {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
  614. {"The Camel's Toe", {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
  615. {"The Clown's Pocket", {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
  616. {"The Emerald Isle", {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
  617. {"The Farm", {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
  618. {"Four Dragons Casino", {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
  619. {"The High Roller", {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
  620. {"The Mako Span", {1664.60,401.70,0.00,1785.10,567.20,200.00}},
  621. {"The Panopticon", {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
  622. {"The Pink Swan", {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
  623. {"The Sherman Dam", {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
  624. {"The Strip", {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
  625. {"The Strip", {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
  626. {"The Strip", {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
  627. {"The Strip", {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
  628. {"The Visage", {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
  629. {"The Visage", {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
  630. {"Unity Station", {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
  631. {"Valle Ocultado", {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
  632. {"Verdant Bluffs", {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
  633. {"Verdant Bluffs", {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
  634. {"Verdant Bluffs", {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
  635. {"Verdant Meadows", {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
  636. {"Verona Beach", {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
  637. {"Verona Beach", {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
  638. {"Verona Beach", {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
  639. {"Verona Beach", {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
  640. {"Verona Beach", {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
  641. {"Vinewood", {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
  642. {"Vinewood", {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
  643. {"Vinewood", {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
  644. {"Vinewood", {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
  645. {"Whitewood Estates", {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
  646. {"Whitewood Estates", {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
  647. {"Willowfield", {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
  648. {"Willowfield", {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
  649. {"Willowfield", {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
  650. {"Willowfield", {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
  651. {"Willowfield", {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
  652. {"Willowfield", {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
  653. {"Willowfield", {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
  654. {"Yellow Bell Station", {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
  655. // Citys Zones
  656. {"Los Santos", {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
  657. {"Las Venturas", {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
  658. {"Bone County", {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
  659. {"Tierra Robada", {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
  660. {"Tierra Robada", {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
  661. {"San Fierro", {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
  662. {"Red County", {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
  663. {"Flint County", {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
  664. {"Whetstone", {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
  665. };
  666. //=================================Ajail cmd stock====================================
  667. stock PlayerName(playerid)
  668. {
  669. new pName[25];
  670. GetPlayerName(playerid, pName, sizeof(pName));
  671. return pName;
  672. }
  673. //=================================Engine=======================================
  674. new vehEngine[MAX_VEHICLES];
  675. //===========================[MAIN]=============================================
  676. main()
  677. {
  678. printf("-------------------------------------");
  679. printf("Zodiac Gaming Roleplay ");
  680. printf("-------------------------------------");
  681. printf("By Vlad Canarez");
  682. }
  683. //==========================[CALLBACKS]=========================================
  684. public Unfreeze(playerid)
  685. {
  686. TogglePlayerControllable(playerid, 1);
  687. return 1;
  688. }
  689. public SyncTime()
  690. {
  691. new string[64];
  692. new tmphour;
  693. new tmpminute;
  694. new tmpsecond;
  695. gettime(tmphour, tmpminute, tmpsecond);
  696. FixHour(tmphour);
  697. tmphour = shifthour;
  698. if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
  699. {
  700. format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
  701. SendClientMessageToAll(COLOR_WHITE,string);
  702. ghour = tmphour;
  703. Payday();
  704. if (realtime)
  705. {
  706. SetWorldTime(tmphour);
  707. }
  708. }
  709. }
  710. public OnPlayerEnterCheckpoint(playerid)
  711. {
  712. if(CP[playerid]==200)//dmv_01
  713. {
  714. if(IsPlayerInVehicle(playerid, dmvc) || IsPlayerInVehicle(playerid, dmvc1) || IsPlayerInVehicle(playerid, dmvc2))
  715. {
  716. DisablePlayerCheckpoint(playerid);
  717. CP[playerid] = 201;
  718. SetPlayerCheckpoint(playerid, 1432.4354,-1658.6343,13.1245, 5.0);
  719. }
  720. else
  721. {
  722. SendClientMessage(playerid, COLOR_LIGHTBLUE,"DMV: You are not in the car!");
  723. SendClientMessage(playerid, COLOR_LIGHTBLUE,"DMV: You didn't passed the test, please try again!");
  724. DisablePlayerCheckpoint(playerid);
  725. RemovePlayerFromVehicle(playerid);
  726. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  727. TakingLesson[playerid] = 0;
  728. }
  729. }
  730. else if(CP[playerid]==201)//dmv_02
  731. {
  732. DisablePlayerCheckpoint(playerid);
  733. CP[playerid] = 202;
  734. SetPlayerCheckpoint(playerid, 1432.3827,-1588.9227,13.1318, 5.0);
  735. }
  736. else if(CP[playerid]==202)//dmv_03
  737. {
  738. DisablePlayerCheckpoint(playerid);
  739. CP[playerid] = 203;
  740. SetPlayerCheckpoint(playerid, 1454.7500,-1480.2014,13.0978, 5.0);
  741. }
  742. else if(CP[playerid]==203)//dmv_04
  743. {
  744. DisablePlayerCheckpoint(playerid);
  745. CP[playerid] = 204;
  746. SetPlayerCheckpoint(playerid, 1457.2000,-1439.2382,13.1303, 5.0);
  747. }
  748. else if(CP[playerid]==204)//dmv_05
  749. {
  750. DisablePlayerCheckpoint(playerid);
  751. CP[playerid] = 205;
  752. SetPlayerCheckpoint(playerid, 1429.9436,-1437.6150,13.1244, 5.0);
  753. }
  754. else if(CP[playerid]==205)//dmv_06
  755. {
  756. DisablePlayerCheckpoint(playerid);
  757. CP[playerid] = 206;
  758. SetPlayerCheckpoint(playerid, 1423.7155,-1398.9248,13.1238, 5.0);
  759. }
  760. else if(CP[playerid]==206)//dmv_07
  761. {
  762. DisablePlayerCheckpoint(playerid);
  763. CP[playerid] = 207;
  764. SetPlayerCheckpoint(playerid, 1350.0922,-1393.0492,13.1469, 5.0);
  765. }
  766. else if(CP[playerid]==207)//dmv_08
  767. {
  768. DisablePlayerCheckpoint(playerid);
  769. CP[playerid] = 208;
  770. SetPlayerCheckpoint(playerid, 1106.5748,-1397.0431,13.1716, 5.0);
  771. }
  772. else if(CP[playerid]==208)//dmv_09
  773. {
  774. DisablePlayerCheckpoint(playerid);
  775. CP[playerid] = 209;
  776. SetPlayerCheckpoint(playerid, 1059.6833,-1419.8898,13.1155, 5.0);
  777. }
  778. else if(CP[playerid]==209)//dmv_10
  779. {
  780. DisablePlayerCheckpoint(playerid);
  781. CP[playerid] = 210;
  782. SetPlayerCheckpoint(playerid, 1035.0563,-1571.5737,13.1341, 5.0);
  783. }
  784. else if(CP[playerid]==210)//dmv_11
  785. {
  786. DisablePlayerCheckpoint(playerid);
  787. CP[playerid] = 211;
  788. SetPlayerCheckpoint(playerid, 1143.5441,-1574.9717,13.0121, 5.0);
  789. }
  790. else if(CP[playerid]==211)//dmv_12
  791. {
  792. DisablePlayerCheckpoint(playerid);
  793. CP[playerid] = 212;
  794. SetPlayerCheckpoint(playerid, 1289.9336,-1574.8125,13.1246, 5.0);
  795. }
  796. else if(CP[playerid]==212)//dmv_13
  797. {
  798. DisablePlayerCheckpoint(playerid);
  799. CP[playerid] = 213;
  800. SetPlayerCheckpoint(playerid, 1295.0909,-1659.1091,13.1246, 5.0);
  801. }
  802. else if(CP[playerid]==213)//dmv_14
  803. {
  804. DisablePlayerCheckpoint(playerid);
  805. CP[playerid] = 214;
  806. SetPlayerCheckpoint(playerid, 1295.0031,-1704.4797,13.1240, 5.0);
  807. }
  808. else if(CP[playerid]==214)//dmv_15
  809. {
  810. DisablePlayerCheckpoint(playerid);
  811. CP[playerid] = 215;
  812. SetPlayerCheckpoint(playerid, 1299.5117,-1817.1479,13.1245, 5.0);
  813. }
  814. else if(CP[playerid]==215)//dmv_16
  815. {
  816. DisablePlayerCheckpoint(playerid);
  817. CP[playerid] = 216;
  818. SetPlayerCheckpoint(playerid, 1300.8134,-1855.0059,13.1245, 5.0);
  819. }
  820. else if(CP[playerid]==216)//dmv_17
  821. {
  822. DisablePlayerCheckpoint(playerid);
  823. CP[playerid] = 217;
  824. SetPlayerCheckpoint(playerid, 1389.0083,-1874.1768,13.1245, 5.0);
  825. }
  826. else if(CP[playerid]==217)//dmv_18
  827. {
  828. DisablePlayerCheckpoint(playerid);
  829. CP[playerid] = 218;
  830. SetPlayerCheckpoint(playerid, 1523.0303,-1874.8875,13.1266, 5.0);
  831. }
  832. else if(CP[playerid]==218)//dmv_19
  833. {
  834. DisablePlayerCheckpoint(playerid);
  835. CP[playerid] = 219;
  836. SetPlayerCheckpoint(playerid, 1571.1161,-1872.5188,13.1252, 5.0);
  837. }
  838. else if(CP[playerid]==219)//dmv_20
  839. {
  840. DisablePlayerCheckpoint(playerid);
  841. CP[playerid] = 220;
  842. SetPlayerCheckpoint(playerid, 1572.3271,-1733.9789,13.1269, 5.0);
  843. }
  844. else if(CP[playerid]==220)//dmv_21
  845. {
  846. DisablePlayerCheckpoint(playerid);
  847. CP[playerid] = 221;
  848. SetPlayerCheckpoint(playerid, 1531.4258,-1730.1346,13.1245, 5.0);
  849. }
  850. else if(CP[playerid]==221)//dmv_22
  851. {
  852. DisablePlayerCheckpoint(playerid);
  853. CP[playerid] = 222;
  854. SetPlayerCheckpoint(playerid, 1437.5671,-1730.2736,13.1254, 5.0);
  855. }
  856. else if(CP[playerid]==222)//dmv_23
  857. {
  858. DisablePlayerCheckpoint(playerid);
  859. CP[playerid] = 223;
  860. SetPlayerCheckpoint(playerid, 1424.2367,-1694.3533,13.2030, 5.0);
  861. }
  862. else if(CP[playerid]==223)//dmv_Final
  863. {
  864. new pName[24];
  865. new str[128];
  866. GetPlayerName(playerid, pName, 24);
  867. pName[strfind(pName,"_")] = ' ';
  868. GivePlayerCash(playerid, -500);
  869. format(str, 128,"DMV: Congratulations %s! You passed the test.", pName);
  870. SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
  871. RemovePlayerFromVehicle(playerid);
  872. SetVehicleToRespawn(GetPlayerVehicleID(playerid));
  873. TakingLesson[playerid] = 0;
  874. PlayerInfo[playerid][pDriveLic] = 1;
  875. DisablePlayerCheckpoint(playerid);
  876. }
  877. else
  878. {
  879. DisablePlayerCheckpoint(playerid);
  880. }
  881. return 1;
  882. }
  883. public OnPlayerSelectedMenuRow(playerid, row)
  884. {
  885. new Menu:current;
  886. current = GetPlayerMenu(playerid);
  887. if(current == Paper)
  888. {
  889. switch(row)
  890. {
  891. case 0:
  892. {
  893. HideMenuForPlayer(Paper, playerid);
  894. ShowMenuForPlayer(Paper2, playerid);
  895. }
  896. case 2:
  897. {
  898. ShowMenuForPlayer(Paper, playerid);
  899. SendClientMessage(playerid,COLOR_GREEN,"____________How to call a taxi:_________________");
  900. SendClientMessage(playerid,COLOR_WHITE,"/call 444");
  901. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  902. }
  903. case 1:
  904. {
  905. ShowMenuForPlayer(Paper, playerid);
  906. SendClientMessage(playerid,COLOR_GREEN,"____________How to get a license:______________");
  907. SendClientMessage(playerid,COLOR_WHITE,"- The license costs 500$");
  908. SendClientMessage(playerid,COLOR_WHITE,"- On your radar has been placed a checkpoint where you can get license");
  909. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  910. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  911. SetPlayerCheckpoint(playerid, 1432.4354,-1658.6343,13.1245,10.0);
  912. }
  913. case 3:
  914. {
  915. ShowMenuForPlayer(Paper, playerid);
  916. SendClientMessage(playerid,COLOR_GREEN,"____________Where To Live:______________");
  917. SendClientMessage(playerid,COLOR_WHITE,"- Rent a room in one of the houses");
  918. SendClientMessage(playerid,COLOR_WHITE,"- Or stay in LS Airport motel");
  919. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  920. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  921. }
  922. case 4:
  923. {
  924. ShowMenuForPlayer(Paper, playerid);
  925. SendClientMessage(playerid,COLOR_GREEN,"____________Need a Medic?:______________");
  926. SendClientMessage(playerid,COLOR_WHITE,"/call 911");
  927. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  928. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  929. }
  930. case 5:
  931. {
  932. ShowMenuForPlayer(Paper, playerid);
  933. SendClientMessage(playerid,COLOR_GREEN,"____________Need the Police?:______________");
  934. SendClientMessage(playerid,COLOR_WHITE,"/call 911");
  935. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  936. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  937. }
  938. case 6:
  939. {
  940. ShowMenuForPlayer(Paper, playerid);
  941. SendClientMessage(playerid,COLOR_GREEN,"_____True RP Forums:_________");
  942. SendClientMessage(playerid,COLOR_WHITE,"(Read rules and guides there)");
  943. SendClientMessage(playerid,COLOR_WHITE,"forums...");
  944. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  945. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  946. }
  947. }
  948. }
  949. if(current == Paper2)
  950. {
  951. switch(row)
  952. {
  953. case 0:
  954. {
  955. HideMenuForPlayer(Paper2, playerid);
  956. ShowMenuForPlayer(Paper, playerid);
  957. }
  958. case 1:
  959. {
  960. ShowMenuForPlayer(Paper, playerid);
  961. SendClientMessage(playerid,COLOR_GREEN,"_____________Garbage Collector_____________");
  962. SendClientMessage(playerid,COLOR_GREEN,"Head to the checkpoint to join this job!");
  963. SendClientMessage(playerid,COLOR_GREEN,"Every job has requirements,you can see them when you arrive there");
  964. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  965. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  966. SetPlayerCheckpoint(playerid,1381.2228,-1088.7719,27.3906,5.0);
  967. }
  968. case 2:
  969. {
  970. ShowMenuForPlayer(Paper, playerid);
  971. SendClientMessage(playerid,COLOR_GREEN,"_____________Taximeter_____________");
  972. SendClientMessage(playerid,COLOR_GREEN,"Head to the checkpoint to join this job!");
  973. SendClientMessage(playerid,COLOR_GREEN,"Every job has requirements,you can see them when you arrive there");
  974. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  975. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  976. SetPlayerCheckpoint(playerid,1381.2228,-1088.7719,27.3906,5.0);
  977. }
  978. case 3:
  979. {
  980. ShowMenuForPlayer(Paper, playerid);
  981. SendClientMessage(playerid,COLOR_GREEN,"_____________Fishing[Temporary Job]_____________");
  982. SendClientMessage(playerid,COLOR_GREEN,"Your searching for the fishing job?You found it.!");
  983. SendClientMessage(playerid,COLOR_GREEN,"/gofishing to get all the information.Shortly,it is a temporary job,you don't get payday from it and you can");
  984. SendClientMessage(playerid,COLOR_GREEN,"fish all the time without getting a contract .");
  985. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  986. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  987. }
  988. case 4:
  989. {
  990. ShowMenuForPlayer(Paper, playerid);
  991. SendClientMessage(playerid,COLOR_GREEN,"_____________Mechanic[Temporary Job]_____________");
  992. SendClientMessage(playerid,COLOR_GREEN,"You will need a towing vehicle for this.!");
  993. SendClientMessage(playerid,COLOR_GREEN,"You will have to answer citizens calls and help them with their car");
  994. SendClientMessage(playerid,COLOR_GREEN,"Command: /mechanic");
  995. SendClientMessage(playerid,COLOR_GREEN,"________________________");
  996. SendClientMessage(playerid,COLOR_WHITE,"To stand up type /stopanim and press ENTER");
  997. }
  998. }
  999. }
  1000. return 1;
  1001. }
  1002. public SetPlayerUnMute()
  1003. {
  1004. for(new i = 0; i < MAX_PLAYERS; i++)
  1005. {
  1006. if(IsPlayerConnected(i))
  1007. {
  1008. if(PlayerInfo[i][pMuted] > 0)
  1009. {
  1010. if(PlayerInfo[i][pMuteTime] > 0)
  1011. {
  1012. PlayerInfo[i][pMuteTime]--;
  1013. }
  1014. if(PlayerInfo[i][pMuteTime] <= 0)
  1015. {
  1016. PlayerInfo[i][pMuteTime] = 0;
  1017. if(PlayerInfo[i][pMuted] == 1)
  1018. {
  1019. PlayerInfo[i][pMuted] = 0;
  1020. }
  1021. PlayerInfo[i][pMuted] = 0;
  1022. SendClientMessage(i,COLOR_LIGHTRED,"Your silence time has expired.You can now talk again ");
  1023. }
  1024. }
  1025. }
  1026. }
  1027. }
  1028.  
  1029. public ScoreUpdate()
  1030. {
  1031. new Score;
  1032. new name[MAX_PLAYER_NAME];
  1033. for(new i=0; i<MAX_PLAYERS; i++)
  1034. {
  1035. if (IsPlayerConnected(i))
  1036. {
  1037. GetPlayerName(i, name, sizeof(name));
  1038. Score = PlayerInfo[i][pLevel];
  1039. SetPlayerScore(i, Score);
  1040. if (Score > ScoreOld)
  1041. {
  1042. ScoreOld = Score;
  1043. }
  1044. }
  1045. }
  1046. }
  1047. public OnGameModeInit()
  1048. {
  1049. //===============================DEALERSHIP=====================================
  1050. LoadVehicles();
  1051. LoadDealerships();
  1052. LoadFuelStations();
  1053. for(new i=1; i < MAX_DVEHICLES; i++)
  1054. {
  1055. UpdateVehicle(i, 0);
  1056. }
  1057. for(new i=1; i < MAX_DEALERSHIPS; i++)
  1058. {
  1059. UpdateDealership(i, 0);
  1060. }
  1061. for(new i=1; i < MAX_FUEL_STATIONS; i++)
  1062. {
  1063. UpdateFuelStation(i, 0);
  1064. }
  1065. SetTimer("MainTimer", 1000, true);
  1066. SetTimer("SaveTimer", 2222, true);
  1067. //==============================================================================
  1068. printf("------ Engine System Started------- ");
  1069. SetGameModeText("Zodiac Gaming Roleplay v0.1");
  1070. gettime(ghour, gminute, gsecond);
  1071. FixHour(ghour);
  1072. ghour = shifthour;
  1073. if (realtime)
  1074. {
  1075. new tmphour;
  1076. new tmpminute;
  1077. new tmpsecond;
  1078. gettime(tmphour, tmpminute, tmpsecond);
  1079. FixHour(tmphour);
  1080. tmphour = shifthour;
  1081. SetWorldTime(tmphour);
  1082. }
  1083. DisableInteriorEnterExits();
  1084. //============================[Menus]===========================================
  1085. Paper = CreateMenu("Paper", 2, 200.0, 100.0, 150.0, 150.0);
  1086. AddMenuItem(Paper, 0, "Next Page");
  1087. AddMenuItem(Paper, 0, "How to get a license");
  1088. AddMenuItem(Paper, 0, "How to call a taxi");
  1089. AddMenuItem(Paper, 0, "Where to live");
  1090. AddMenuItem(Paper, 0, "Medic Help");
  1091. AddMenuItem(Paper, 0, "SAPD help");
  1092. AddMenuItem(Paper, 0, "OOC:Forums");
  1093. Paper2 = CreateMenu("Paper2", 2, 200.0, 100.0, 150.0, 150.0);
  1094. AddMenuItem(Paper2, 0, "Next Page");
  1095. AddMenuItem(Paper2, 0, "Garbage Collector");
  1096. AddMenuItem(Paper2, 0, "Taximeter");
  1097. AddMenuItem(Paper2, 0, "Fishing");
  1098. AddMenuItem(Paper2, 0, "Mechanic");
  1099. Create3DTextLabel("/newspaper for information",COLOR_GREEN, 1707.8434,-2331.6506,-2.6797, 20.0,0,0);
  1100. //================================[TIMERS]=========================================
  1101. SetTimer("SyncTime", 60000, 1);
  1102. SetTimer("ScoreUpdate", 1000, 1);
  1103. SetTimer("SetPlayerUnMute", 1000, 1);
  1104. SetTimer("newbietimer", 30000, 1);
  1105. //===============================[PICKUPS]==========================================
  1106. AddStaticPickup(1239, 23, 1707.8434,-2331.6506,-2.6797);
  1107. AddStaticPickup(1240, 23, 1173.112426, -1320.917602, 15.396226);
  1108. AddStaticPickup(1318, 23, 1172.914794, -1325.471313, 15.398929);
  1109. AddStaticPickup(1318, 23, 1482.534423, -1771.555541, 18.795755);
  1110. AddStaticPickup(1318, 23, 1555.134277, -1675.773071, 16.195312);
  1111. AddStaticPickup(1318, 23, 1565.185180, -1666.162963, 28.395606);
  1112. AddStaticPickup(1318, 23, 1653.883056, -1655.420898, 22.515625);
  1113. AddStaticPickup(1247, 23, 1525.285278, -1677.911865, 5.890625);
  1114. AddStaticPickup(1318, 23, 1568.560302, -1690.335815, 5.890625);
  1115. AddStaticPickup(1318, 23, 1727.056884, -1636.913208, 20.217334);
  1116. AddStaticPickup(1318, 23, 1797.998046, -1578.819091, 14.090865);
  1117. AddStaticPickup(1240, 23, 2034.583374, -1405.004516, 17.244943);
  1118. AddStaticPickup(1318, 23, 2233.053955, -1333.350463, 23.981575);
  1119. AddStaticPickup(1318, 23, 2232.929931, -1159.893554, 25.890625);
  1120. AddStaticPickup(1318, 23, 2351.947021, -1170.659545, 28.074401);
  1121. AddStaticPickup(1318, 23, 2421.583496, -1219.243041, 25.561477);
  1122. AddStaticPickup(1318, 23, 2166.275634, -1671.659545, 15.073946);
  1123. AddStaticPickup(1239, 23, 2165.229736, -1672.992187, 15.077716);
  1124. AddStaticPickup(1239, 23, 1666.597900, -1524.166992, 13.546875);
  1125. AddStaticPickup(1318, 23, 1667.901611, -1521.946777, 13.546875);
  1126. AddStaticPickup(1318, 23, 1568.028320, -1898.009155, 13.560886);
  1127. AddStaticPickup(1239, 23, 2162.161376, -102.522369, 2.750000);
  1128. //==============================[VEHICLES]==========================================
  1129. AddStaticVehicle(596,1535.8279,-1667.0283,13.1042,1.2749,0,1); // //Copcar 1
  1130. AddStaticVehicle(596,1535.7777,-1678.2174,13.1041,359.0435,0,1); // //Copcar 2
  1131. AddStaticVehicle(596,1602.2314,-1688.1366,5.6119,88.9127,0,1); // //Copcar 3
  1132. AddStaticVehicle(596,1602.3998,-1696.2252,5.6117,89.5110,0,1); // //Copcar 4
  1133. AddStaticVehicle(596,1602.2968,-1704.6088,5.6114,89.2925,0,1); // //Copcar 5
  1134. AddStaticVehicle(596,1591.6299,-1711.7292,5.6110,0.5575,0,1); // //Copcar 6
  1135. AddStaticVehicle(596,1583.3506,-1711.8403,5.6123,359.9798,0,1); // //Copcar 7
  1136. AddStaticVehicle(596,1574.4407,-1711.5636,5.6112,0.4981,0,1); // //Copcar 8
  1137. AddStaticVehicle(596,1564.4946,-1711.8907,5.6117,0.0557,0,1); // //Copcar 9
  1138. AddStaticVehicle(597,1602.1552,-1691.9513,5.6600,90.2862,1,0); // //Copcar 10
  1139. AddStaticVehicle(597,1602.1045,-1684.0902,5.6588,89.9887,1,0); // //Copcar 11
  1140. AddStaticVehicle(597,1602.5887,-1700.3116,5.6600,90.1532,1,0); // //Copcar 12
  1141. AddStaticVehicle(597,1595.2753,-1711.4293,5.6598,1.4325,1,93); // //Copcar 13
  1142. AddStaticVehicle(597,1587.3236,-1711.8318,5.6587,359.5460,1,93); // //Copcar 14
  1143. AddStaticVehicle(598,1578.6815,-1712.0513,5.6365,358.1766,1,93); // //Copcar 15
  1144. AddStaticVehicle(598,1570.2655,-1711.8102,5.6356,359.8264,1,93); // //Copcar 16
  1145. AddStaticVehicle(596,1558.4491,-1711.7164,5.6120,0.7168,1,93); // //Copcar 17
  1146. AddStaticVehicle(596,1584.6483,-1671.5382,5.6145,270.2792,1,93); // //Copcar 18
  1147. AddStaticVehicle(596,1584.6222,-1667.4482,5.6145,270.0910,1,93); // //Copcar 19
  1148. AddStaticVehicle(599,1546.2502,-1650.8398,6.0786,90.8912,0,1); // //cop car 20
  1149. AddStaticVehicle(599,1546.8645,-1659.1162,6.0787,90.3100,0,1); // //cop car 21
  1150. AddStaticVehicle(599,1546.6399,-1667.8623,6.0780,90.4493,0,1); // //cop car 22
  1151. AddStaticVehicle(601,1545.8365,-1655.1222,5.6494,89.7686,0,1); // //cop car Swat Tank 23
  1152. AddStaticVehicle(528,1546.2603,-1662.9534,5.9328,89.3495,0,1); // //cop FBI truck(blue one) 24
  1153. AddStaticVehicle(427,1530.1572,-1644.9054,6.0225,179.7986,0,1); // //SWAT Enforcer 25
  1154. AddStaticVehicle(427,1538.6517,-1644.5701,6.0426,180.0564,0,1); // //SWAT Enforcer 26
  1155. AddStaticVehicle(427,1534.6859,-1645.0800,6.0228,178.4550,0,1); // //SWAT Enforcer 27
  1156. AddStaticVehicle(427,1526.0662,-1645.3656,6.0223,180.0917,0,1); // //SWAT Enforcer 28
  1157. AddStaticVehicle(428,570.7433,-1252.2587,17.6663,292.1557,24,1); // //Bank Truck in Rodeo Car 29
  1158. AddStaticVehicle(428,608.0444,-1237.8926,18.4802,111.9092,24,1); // //Bank Truck in Rodeo Car 30
  1159. AddStaticVehicle(426,1543.2870,-1612.4788,13.1262,269.5055,25,25); // //Cop Undercover Car 31
  1160. AddStaticVehicle(426,1543.1644,-1606.7509,13.1253,269.9076,25,25); // //Cop Undercover Car 32
  1161. AddStaticVehicle(421,1555.6886,-1605.9546,13.2653,180.6853,53,53); // //Cop Undercover Car 33
  1162. AddStaticVehicle(421,1561.6571,-1606.0315,13.2653,180.1476,53,53); // //Cop Undercover Car 34
  1163. AddStaticVehicle(416,1177.8341,-1338.3657,14.0368,270.3866,1,3); // //Ambulance EMS Car 35
  1164. AddStaticVehicle(416,1176.9736,-1308.6931,14.0205,267.3689,1,3); // //Ambulance EMS Car 36
  1165. AddStaticVehicle(442,1146.2450,-1295.7229,13.4723,90.3940,1,3); // Hearse for EMS Car 37
  1166. AddStaticVehicle(489,1146.2805,-1302.9196,13.8021,88.5398,1,3); // Rancher for EMS Car 38
  1167. AddStaticVehicle(489,1146.2393,-1309.4309,13.8083,91.4548,1,3); // Rancher for EMS Car 39
  1168. AddStaticVehicle(442,1145.8127,-1316.3143,13.4507,92.9838,1,3); // Hearse for EMS Car 40
  1169. AddStaticVehicle(563,1162.4646,-1301.3418,32.2003,277.2430,1,3); // EMS Heli 41
  1170. AddStaticVehicle(563,1163.9746,-1318.8575,32.1941,271.8757,1,3); // EMS Heli 42
  1171. AddStaticVehicle(490,1666.7798,-1719.3749,20.6192,0.9672,0,0); // FBI 43
  1172. AddStaticVehicle(490,1660.0472,-1719.5132,20.6102,359.8513,0,0); // FBI 44
  1173. AddStaticVehicle(490,1671.4838,-1710.0861,20.6083,90.5516,0,0); // FBI 45
  1174. AddStaticVehicle(490,1671.6444,-1702.4733,20.6114,92.2191,0,0); // FBI 46
  1175. AddStaticVehicle(541,1645.6516,-1695.8042,20.0834,270.8706,0,0); // FBI Bullet Car 47
  1176. AddStaticVehicle(541,1645.8918,-1700.3801,20.1054,270.4592,0,1); // FBI Bullet Car 48
  1177. AddStaticVehicle(421,1646.3101,-1709.2988,20.3669,269.9211,0,1); // FBI Washington Car 49
  1178. AddStaticVehicle(421,1646.3663,-1704.7172,20.3669,268.8617,0,1); // FBI Washington Car 50
  1179. AddStaticVehicle(416,2037.2849,-1425.5010,17.1416,359.6898,1,3); // //County hospital ambulance Car 51
  1180. AddStaticVehicle(416,2007.9158,-1410.9948,17.1415,90.1937,1,3); // //County hospital ambulance Car 52
  1181. AddStaticVehicle(416,2001.8311,-1399.1924,18.3391,181.5330,1,3); // //County hospital ambulance Car 53
  1182. AddStaticVehicle(416,2033.9324,-1447.6057,17.3766,270.3489,1,3); // //County hospital ambulance Car 54
  1183. dmvc = AddStaticVehicle(405,1415.5630,-1706.7310,13.4196,267.9858,1,1); // license1
  1184. dmvc1 = AddStaticVehicle(405,1416.1293,-1712.1976,13.4219,271.2856,1,1); // license2
  1185. dmvc2 = AddStaticVehicle(405,1415.3511,-1718.4138,13.4218,267.3419,1,1); // license3
  1186. //==========================[Custom mapping for people]=========================
  1187. CreateObject(987, 1455.4000244141, -676.70001220703, 93.800003051758, 0, 0, 90);
  1188. CreateObject(987, 1455.4000244141, -688.70001220703, 93.199996948242, 0, 0, 90);
  1189. CreateObject(987, 1455.5999755859, -667.20001220703, 93.800003051758, 0, 0, 90);
  1190. CreateObject(987, 1467.8000488281, -655.59997558594, 92.5, 0, 0, 180);
  1191. CreateObject(987, 1479.5999755859, -655.70001220703, 90.800003051758, 0, 0, 179.99450683594);
  1192. CreateObject(987, 1491.5999755859, -655.70001220703, 90.800003051758, 0, 0, 179.99450683594);
  1193. CreateObject(987, 1503.5, -655.79998779297, 90.800003051758, 0, 0, 179.99450683594);
  1194. CreateObject(987, 1515.5, -655.79998779297, 90.300003051758, 0, 0, 179.99450683594);
  1195. CreateObject(987, 1527.5, -655.79998779297, 90.300003051758, 0, 0, 179.99450683594);
  1196. CreateObject(987, 1532.0999755859, -655.90002441406, 90.400001525879, 0, 0, 179.99450683594);
  1197. CreateObject(987, 1531.9000244141, -667.79998779297, 90.300003051758, 0, 0, 90);
  1198. CreateObject(987, 1531.9000244141, -679.70001220703, 91.199996948242, 0, 0, 90);
  1199. CreateObject(987, 1531.9000244141, -691.59997558594, 91.300003051758, 0, 0, 90);
  1200. CreateObject(987, 1531.9000244141, -700.70001220703, 91.300003051758, 0, 0, 90);
  1201. CreateObject(987, 1532, -700.70001220703, 91.300003051758, 0, 0, 180);
  1202. CreateObject(987, 1520.1999511719, -700.59997558594, 91.300003051758, 0, 0, 179.99450683594);
  1203. CreateObject(987, 1511.4000244141, -700.5, 93.199996948242, 0, 0, 179.99450683594);
  1204. CreateObject(987, 1491.6999511719, -700.5, 93.800003051758, 0, 0, 179.99450683594);
  1205. CreateObject(987, 1480.0999755859, -700.70001220703, 91.800003051758, 0, 0, 179.99450683594);
  1206. CreateObject(987, 1468, -700.70001220703, 90.800003051758, 0, 0, 179.99450683594);
  1207. CreateObject(987, 1455.1999511719, -700.70001220703, 90.699996948242, 0, 0, 90);
  1208. CreateObject(987, 1467, -700.70001220703, 90.800003051758, 0, 0, 179.99450683594);
  1209. CreateObject(980, 321.70001220703, -1188.4000244141, 77.099998474121, 0, 0, 39.995727539063);
  1210. CreateObject(980, 1496.5999755859, -700.5, 96.5, 0, 0, 0);
  1211. CreateObject(3934, -2322.3000488281, -1603.3000488281, 482.89999389648, 0, 0, 284);
  1212. CreateObject(3934, 1465.8000488281, -665, 93.800003051758, 0, 0, 0);
  1213. CreateObject(11489, -2326.6000976563, -1590.1999511719, 482.70001220703, 0, 0, 16);
  1214. CreateObject(3605, -2315.6999511719, -1627.4000244141, 488.79998779297, 0, 0, 14.5712890625);
  1215. CreateObject(3604, -2325.6999511719, -1661.8000488281, 484.70001220703, 0, 0, 103.78579711914);
  1216. CreateObject(3604, -2322.1000976563, -1676.6999511719, 483.89999389648, 0, 0, 103.78234863281);
  1217. CreateObject(980, 1505.4000244141, -700.20001220703, 96.5, 0, 0, 0);
  1218. //=============================[PRISON]==============================
  1219. CreateObject(18450,1433.40002441,-2729.39990234,12.30000019,0.00000000,0.00000000,84.65521240); //object(cs_roadbridge04) (1)
  1220. CreateObject(18450,1426.00000000,-2808.50000000,12.30000019,0.00000000,0.00000000,84.65515137); //object(cs_roadbridge04) (2)
  1221. CreateObject(11463,1430.59997559,-2766.19995117,-7.19999981,0.00000000,0.00000000,252.00402832); //object(des_railbr_twr05) (1)
  1222. CreateObject(10766,1449.59960938,-2878.29980469,10.60000038,0.00000000,0.00000000,85.03967285); //object(airport_10_sfse) (1)
  1223. CreateObject(10766,1382.79980469,-2872.89941406,10.60000038,0.00000000,0.00000000,264.94628906); //object(airport_10_sfse) (2)
  1224. CreateObject(10766,1379.00000000,-2916.39990234,10.60000038,0.00000000,0.00000000,264.95068359); //object(airport_10_sfse) (3)
  1225. CreateObject(10766,1445.89941406,-2922.39941406,10.60000038,0.00000000,0.00000000,85.39672852); //object(airport_10_sfse) (4)
  1226. CreateObject(4079,1460.59960938,-2923.79980469,25.39999962,0.00000000,0.00000000,174.63317871); //object(twintjail1_lan) (1)
  1227. CreateObject(5061,1487.30004883,-2898.39990234,15.89999962,0.00000000,0.00000000,41.88085938); //object(lascarl) (2)
  1228. CreateObject(5061,1487.30004883,-2898.39990234,13.10000038,0.00000000,0.00000000,41.87988281); //object(lascarl) (3)
  1229. CreateObject(5061,1431.09997559,-2945.89990234,13.89999962,0.00000000,0.00000000,38.32040405); //object(lascarl) (4)
  1230. CreateObject(5061,1431.09997559,-2945.89990234,16.39999962,0.00000000,0.00000000,38.32031250); //object(lascarl) (5)
  1231. CreateObject(18450,1425.80004883,-2811.50000000,12.30000019,0.00000000,0.41748047,84.50964355); //object(cs_roadbridge04) (3)
  1232. CreateObject(3753,1388.19995117,-2954.80004883,3.29999995,0.00000000,0.00000000,175.36688232); //object(dockwall_las2) (1)
  1233. CreateObject(9241,1359.09997559,-2862.10009766,14.69999981,0.00000000,0.00000000,355.35504150); //object(copbits_sfn) (1)
  1234. CreateObject(8947,1421.40002441,-2862.60009766,9.89999962,0.00000000,0.00000000,356.51623535); //object(vgelkup) (1)
  1235. CreateObject(8947,1421.00000000,-2862.60009766,9.89999962,0.00000000,0.00000000,354.67944336); //object(vgelkup) (2)
  1236. CreateObject(8947,1406.59997559,-2861.50000000,9.89999962,0.00000000,0.00000000,355.83605957); //object(vgelkup) (3)
  1237. CreateObject(8947,1404.89941406,-2884.50000000,9.89999962,0.00000000,0.00000000,355.90423584); //object(vgelkup) (4)
  1238. CreateObject(8947,1419.40002441,-2885.89990234,9.89999962,0.00000000,0.00000000,354.67712402); //object(vgelkup) (8)
  1239. CreateObject(8947,1434.90002441,-2863.80004883,9.89999962,0.00000000,0.00000000,354.67712402); //object(vgelkup) (9)
  1240. CreateObject(8947,1432.59997559,-2887.00000000,9.89999962,0.00000000,0.00000000,354.67712402); //object(vgelkup) (11)
  1241. CreateObject(987,1414.40002441,-2847.19995117,12.30000019,0.00000000,0.00000000,175.28143311); //object(elecfence_bar) (1)
  1242. CreateObject(987,1402.69995117,-2846.19995117,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (2)
  1243. CreateObject(987,1390.90002441,-2845.19995117,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (3)
  1244. CreateObject(987,1379.00000000,-2844.19995117,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (4)
  1245. CreateObject(987,1367.30004883,-2843.10009766,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (5)
  1246. CreateObject(987,1355.80004883,-2842.10009766,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (6)
  1247. CreateObject(987,1352.69995117,-2841.89990234,12.30000019,0.00000000,0.00000000,175.28137207); //object(elecfence_bar) (8)
  1248. CreateObject(987,1341.09997559,-2840.80004883,12.30000019,0.00000000,0.00000000,266.48010254); //object(elecfence_bar) (9)
  1249. CreateObject(987,1340.19995117,-2853.00000000,12.30000019,0.00000000,0.00000000,265.35876465); //object(elecfence_bar) (10)
  1250. CreateObject(987,1339.30004883,-2864.80004883,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (11)
  1251. CreateObject(987,1338.19995117,-2876.69995117,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (12)
  1252. CreateObject(987,1337.19995117,-2888.50000000,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (13)
  1253. CreateObject(987,1336.19995117,-2900.10009766,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (14)
  1254. CreateObject(987,1335.30004883,-2912.10009766,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (15)
  1255. CreateObject(987,1334.40002441,-2924.10009766,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (16)
  1256. CreateObject(987,1334.00000000,-2929.80004883,12.30000019,0.00000000,0.00000000,265.35827637); //object(elecfence_bar) (17)
  1257. CreateObject(987,1333.09997559,-2941.50000000,12.30000019,0.00000000,0.00000000,355.39965820); //object(elecfence_bar) (18)
  1258. CreateObject(987,1344.90002441,-2942.39990234,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (19)
  1259. CreateObject(987,1356.90002441,-2943.39990234,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (20)
  1260. CreateObject(987,1368.80004883,-2944.39990234,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (21)
  1261. CreateObject(987,1377.50000000,-2945.10009766,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (22)
  1262. CreateObject(987,1403.80004883,-2947.19995117,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (23)
  1263. CreateObject(987,1415.50000000,-2948.10009766,12.30000019,0.00000000,0.00000000,355.39672852); //object(elecfence_bar) (24)
  1264. CreateObject(987,1427.09997559,-2949.00000000,12.30000019,0.00000000,0.00000000,0.04174805); //object(elecfence_bar) (25)
  1265. CreateObject(987,1491.59997559,-2901.80004883,12.30000019,0.00000000,0.00000000,84.50799561); //object(elecfence_bar) (26)
  1266. CreateObject(987,1485.40002441,-2911.69995117,12.30000019,0.00000000,0.00000000,57.79867554); //object(elecfence_bar) (27)
  1267. CreateObject(987,1492.69995117,-2889.89990234,12.30000019,0.00000000,0.00000000,84.50683594); //object(elecfence_bar) (28)
  1268. CreateObject(987,1493.59997559,-2878.19995117,12.30000019,0.00000000,0.00000000,84.50683594); //object(elecfence_bar) (30)
  1269. CreateObject(987,1494.80004883,-2866.50000000,12.30000019,0.00000000,0.00000000,84.50683594); //object(elecfence_bar) (31)
  1270. CreateObject(987,1496.09997559,-2854.50000000,12.30000019,0.00000000,0.00000000,174.91296387); //object(elecfence_bar) (32)
  1271. CreateObject(987,1484.59997559,-2853.50000000,12.30000019,0.00000000,0.00000000,174.90783691); //object(elecfence_bar) (33)
  1272. CreateObject(987,1472.90002441,-2852.50000000,12.30000019,0.00000000,0.00000000,174.90783691); //object(elecfence_bar) (34)
  1273. CreateObject(987,1461.40002441,-2851.50000000,12.30000019,0.00000000,0.00000000,174.90783691); //object(elecfence_bar) (35)
  1274. CreateObject(987,1449.59997559,-2850.30004883,12.30000019,0.00000000,0.00000000,174.90783691); //object(elecfence_bar) (36)
  1275. CreateObject(987,1442.09997559,-2849.60009766,12.30000019,0.00000000,0.00000000,174.90783691); //object(elecfence_bar) (37)
  1276. CreateObject(8947,1343.90002441,-2927.60009766,9.89999962,0.00000000,0.00000000,355.90423584); //object(vgelkup) (12)
  1277. CreateObject(8947,1345.69995117,-2903.19995117,9.89999962,0.00000000,0.00000000,355.90209961); //object(vgelkup) (13)
  1278. CreateObject(8947,1359.90002441,-2904.19995117,9.89999962,0.00000000,0.00000000,355.90209961); //object(vgelkup) (14)
  1279. CreateObject(8947,1358.39941406,-2928.69921875,9.89999962,0.00000000,0.00000000,355.90209961); //object(vgelkup) (15)
  1280. CreateObject(8947,1378.90002441,-2900.69995117,9.89999962,0.00000000,0.00000000,85.07812500); //object(vgelkup) (16)
  1281. CreateObject(8947,1402.09960938,-2902.69921875,9.89999962,0.00000000,0.00000000,85.07263184); //object(vgelkup) (17)
  1282. CreateObject(8947,1426.09960938,-2904.89941406,9.89999962,0.00000000,0.00000000,85.07263184); //object(vgelkup) (18)
  1283. CreateObject(8947,1441.90002441,-2917.39990234,9.89999962,0.00000000,0.00000000,128.04016113); //object(vgelkup) (19)
  1284. CreateObject(8947,1433.00000000,-2906.00000000,9.89999962,0.00000000,0.00000000,128.04016113); //object(vgelkup) (20)
  1285. CreateObject(987,1452.09997559,-2850.89990234,12.69999981,0.00000000,0.00000000,266.54028320); //object(elecfence_bar) (38)
  1286. CreateObject(987,1451.39941406,-2862.59960938,12.69999981,0.00000000,0.00000000,266.53381348); //object(elecfence_bar) (39)
  1287. CreateObject(987,1450.69921875,-2874.39941406,12.69999981,0.00000000,0.00000000,266.53381348); //object(elecfence_bar) (40)
  1288. CreateObject(987,1449.89941406,-2886.19921875,12.69999981,0.00000000,0.00000000,266.53381348); //object(elecfence_bar) (41)
  1289. CreateObject(987,1449.50000000,-2892.89941406,12.69999981,0.00000000,0.00000000,267.69836426); //object(elecfence_bar) (43)
  1290. CreateObject(989,1450.29980469,-2906.89941406,13.30000019,0.00000000,0.00000000,49.92736816); //object(ac_apgate) (1)
  1291. CreateObject(989,1450.29980469,-2906.89941406,15.39999962,0.00000000,0.00000000,49.92736816); //object(ac_apgate) (2)
  1292. CreateObject(10183,1366.80004883,-2896.39990234,13.00000000,0.00000000,0.00000000,41.24279785); //object(ferspaces) (1)
  1293. CreateObject(10183,1402.39941406,-2874.59960938,13.00000000,0.00000000,0.00000000,131.24267578); //object(ferspaces) (2)
  1294. CreateObject(10183,1437.29980469,-2872.79980469,13.00000000,0.00000000,0.00000000,310.06164551); //object(ferspaces) (3)
  1295. CreateObject(10183,1341.00000000,-2919.30004883,13.00000000,0.00000000,0.00000000,130.93243408); //object(ferspaces) (4)
  1296. CreateObject(3109,1481.90002441,-2895.39990234,14.10000038,0.00000000,0.00000000,264.66833496); //object(imy_la_door) (1)
  1297. CreateObject(982,1397.59997559,-2881.89990234,13.50000000,0.00000000,0.00000000,355.64666748); //object(fenceshit) (2)
  1298. CreateObject(982,1399.30004883,-2859.50000000,13.50000000,0.00000000,0.00000000,355.64392090); //object(fenceshit) (3)
  1299. CreateObject(982,1383.80004883,-2893.69995117,13.50000000,0.00000000,0.00000000,265.22821045); //object(fenceshit) (4)
  1300. CreateObject(10183,1448.69995117,-2913.10009766,13.00000000,0.00000000,0.00000000,353.02795410); //object(ferspaces) (3)
  1301. CreateObject(3749,1422.19995117,-2849.39990234,18.39999962,0.00000000,0.00000000,355.07482910); //object(clubgate01_lax) (1)
  1302. CreateObject(3666,1370.19995117,-2874.89990234,16.00000000,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (1)
  1303. CreateObject(3666,1372.09997559,-2851.19995117,16.00000000,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (2)
  1304. CreateObject(3666,1348.00000000,-2849.39990234,16.00000000,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (4)
  1305. CreateObject(3666,1346.69995117,-2872.80004883,16.00000000,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (5)
  1306. CreateObject(1294,1443.59997559,-2692.00000000,17.39999962,0.00000000,0.00000000,355.35498047); //object(mlamppost) (1)
  1307. CreateObject(1294,1430.30004883,-2690.80004883,17.39999962,0.00000000,0.00000000,175.79809570); //object(mlamppost) (2)
  1308. CreateObject(1294,1433.40002441,-2786.60009766,17.20000076,0.00000000,0.00000000,354.19372559); //object(mlamppost) (3)
  1309. CreateObject(1294,1422.69995117,-2785.69995117,17.20000076,0.00000000,0.00000000,176.23266602); //object(mlamppost) (4)
  1310. CreateObject(1297,1442.19995117,-2861.19995117,16.29999924,0.00000000,0.00000000,355.35498047); //object(lamppost1) (1)
  1311. CreateObject(1297,1439.80004883,-2885.50000000,16.29999924,0.00000000,0.00000000,355.35278320); //object(lamppost1) (2)
  1312. CreateObject(1297,1397.69995117,-2882.80004883,16.29999924,0.00000000,0.00000000,176.23046875); //object(lamppost1) (3)
  1313. CreateObject(1297,1400.00000000,-2858.50000000,16.29999924,0.00000000,0.00000000,176.22619629); //object(lamppost1) (4)
  1314. CreateObject(1297,1365.19995117,-2934.89990234,16.29999924,0.00000000,0.00000000,356.51623535); //object(lamppost1) (5)
  1315. CreateObject(1297,1366.90002441,-2913.00000000,16.29999924,0.00000000,0.00000000,357.67749023); //object(lamppost1) (6)
  1316. CreateObject(1297,1379.30004883,-2892.89990234,16.29999924,0.00000000,0.00000000,86.27722168); //object(lamppost1) (7)
  1317. CreateObject(1297,1378.19995117,-2907.89990234,16.29999924,0.00000000,0.00000000,265.99182129); //object(lamppost1) (8)
  1318. CreateObject(1297,1415.80004883,-2911.30004883,16.29999924,0.00000000,0.00000000,265.98999023); //object(lamppost1) (9)
  1319. CreateObject(1297,1346.59997559,-2891.00000000,16.29999924,0.00000000,0.00000000,86.27563477); //object(lamppost1) (10)
  1320. CreateObject(1215,1445.09997559,-2909.69995117,13.80000019,0.00000000,0.00000000,0.00000000); //object(bollardlight) (1)
  1321. CreateObject(1215,1447.90002441,-2907.30004883,13.80000019,0.00000000,0.00000000,0.00000000); //object(bollardlight) (2)
  1322. CreateObject(1215,1446.30004883,-2914.39990234,13.80000019,0.00000000,0.00000000,0.00000000); //object(bollardlight) (3)
  1323. CreateObject(3749,1394.19995117,-2902.00000000,18.39999962,0.00000000,0.00000000,265.09655762); //object(clubgate01_lax) (6)
  1324. CreateObject(984,1402.09997559,-2910.19995117,13.60000038,0.00000000,0.00000000,85.42657471); //object(fenceshit2) (1)
  1325. CreateObject(984,1414.19995117,-2911.30004883,13.60000038,0.00000000,0.00000000,84.26296997); //object(fenceshit2) (2)
  1326. CreateObject(984,1415.80004883,-2911.50000000,13.60000038,0.00000000,0.00000000,84.25964355); //object(fenceshit2) (3)
  1327. CreateObject(984,1426.00000000,-2917.10009766,13.60000038,0.00000000,0.00000000,37.93118286); //object(fenceshit2) (4)
  1328. CreateObject(984,1432.50000000,-2925.39990234,13.60000038,0.00000000,0.00000000,37.93029785); //object(fenceshit2) (5)
  1329. CreateObject(3109,1429.19995117,-2939.69995117,14.10000038,0.00000000,0.00000000,353.45263672); //object(imy_la_door) (2)
  1330. CreateObject(8673,1460.90002441,-2880.39990234,14.39999962,0.00000000,0.00000000,0.00000000); //object(csrsfence03_lvs) (1)
  1331. CreateObject(8673,1472.30004883,-2863.19995117,14.39999962,0.00000000,0.00000000,266.47497559); //object(csrsfence03_lvs) (2)
  1332. CreateObject(8673,1472.00000000,-2868.69995117,14.39999962,0.00000000,0.00000000,266.47338867); //object(csrsfence03_lvs) (3)
  1333. CreateObject(946,1461.59997559,-2877.39990234,15.10000038,0.00000000,0.00000000,0.00000000); //object(bskball_lax) (1)
  1334. CreateObject(946,1462.30004883,-2855.00000000,15.10000038,0.00000000,0.00000000,176.23266602); //object(bskball_lax) (2)
  1335. CreateObject(2114,1461.69995117,-2865.19995117,13.10000038,0.00000000,0.00000000,0.00000000); //object(basketball) (1)
  1336. CreateObject(1280,1470.90002441,-2875.39990234,13.30000019,0.00000000,0.00000000,357.24719238); //object(parkbench1) (1)
  1337. CreateObject(1280,1471.09997559,-2871.69995117,13.30000019,0.00000000,0.00000000,357.24243164); //object(parkbench1) (2)
  1338. CreateObject(1280,1471.30004883,-2867.89990234,13.30000019,0.00000000,0.00000000,357.24243164); //object(parkbench1) (3)
  1339. CreateObject(1280,1471.59997559,-2864.19995117,13.30000019,0.00000000,0.00000000,357.24243164); //object(parkbench1) (4)
  1340. CreateObject(2627,1459.80004883,-2894.80004883,12.89999962,0.00000000,0.00000000,177.39392090); //object(gym_treadmill) (1)
  1341. CreateObject(2627,1458.00000000,-2894.69995117,12.89999962,0.00000000,0.00000000,177.39074707); //object(gym_treadmill) (2)
  1342. CreateObject(2627,1456.30004883,-2894.60009766,12.89999962,0.00000000,0.00000000,177.39074707); //object(gym_treadmill) (3)
  1343. CreateObject(2627,1454.59997559,-2894.50000000,12.89999962,0.00000000,0.00000000,177.39074707); //object(gym_treadmill) (4)
  1344. CreateObject(2627,1452.90002441,-2894.39990234,12.89999962,0.00000000,0.00000000,177.39074707); //object(gym_treadmill) (5)
  1345. CreateObject(2627,1450.90002441,-2894.30004883,12.89999962,0.00000000,0.00000000,177.39074707); //object(gym_treadmill) (6)
  1346. CreateObject(2628,1451.69995117,-2888.19995117,12.89999962,0.00000000,0.00000000,90.04092407); //object(gym_bench2) (1)
  1347. CreateObject(2628,1451.90002441,-2886.39990234,12.89999962,0.00000000,0.00000000,87.71600342); //object(gym_bench2) (2)
  1348. CreateObject(2628,1451.80004883,-2884.69995117,12.89999962,0.00000000,0.00000000,87.71484375); //object(gym_bench2) (3)
  1349. CreateObject(2628,1451.80004883,-2883.00000000,12.89999962,0.00000000,0.00000000,87.71484375); //object(gym_bench2) (4)
  1350. CreateObject(2629,1455.69995117,-2882.10009766,12.89999962,0.00000000,0.00000000,0.00000000); //object(gym_bench1) (1)
  1351. CreateObject(2629,1457.80004883,-2882.00000000,12.89999962,0.00000000,0.00000000,1.16122437); //object(gym_bench1) (2)
  1352. CreateObject(2629,1460.09997559,-2882.00000000,12.89999962,0.00000000,0.00000000,1.15905762); //object(gym_bench1) (3)
  1353. CreateObject(2629,1462.30004883,-2881.80004883,12.89999962,0.00000000,0.00000000,1.15905762); //object(gym_bench1) (4)
  1354. CreateObject(2629,1464.30004883,-2881.80004883,12.89999962,0.00000000,0.00000000,1.15905762); //object(gym_bench1) (5)
  1355. CreateObject(2630,1466.40002441,-2881.60009766,12.89999962,0.00000000,0.00000000,0.00000000); //object(gym_bike) (1)
  1356. CreateObject(2630,1468.19995117,-2881.80004883,12.89999962,0.00000000,0.00000000,0.00000000); //object(gym_bike) (2)
  1357. CreateObject(2630,1469.90002441,-2881.69995117,12.89999962,0.00000000,0.00000000,0.00000000); //object(gym_bike) (3)
  1358. CreateObject(2915,1467.30004883,-2894.50000000,13.10000038,0.00000000,0.00000000,355.35498047); //object(kmb_dumbbell2) (1)
  1359. CreateObject(2915,1466.09997559,-2894.30004883,13.10000038,0.00000000,0.00000000,355.35278320); //object(kmb_dumbbell2) (2)
  1360. CreateObject(2915,1464.80004883,-2894.19995117,13.10000038,0.00000000,0.00000000,355.35278320); //object(kmb_dumbbell2) (3)
  1361. CreateObject(2915,1468.59997559,-2894.69995117,13.10000038,0.00000000,0.00000000,355.35278320); //object(kmb_dumbbell2) (4)
  1362. CreateObject(2915,1463.59997559,-2893.30004883,13.10000038,0.00000000,0.00000000,355.35278320); //object(kmb_dumbbell2) (5)
  1363. CreateObject(2913,1453.50000000,-2881.39990234,13.19999981,0.00000000,90.57537842,1.16122437); //object(kmb_bpress) (1)
  1364. CreateObject(2913,1457.30004883,-2880.69995117,13.19999981,0.00000000,90.57128906,1.15905762); //object(kmb_bpress) (2)
  1365. CreateObject(2913,1459.59997559,-2880.69995117,13.19999981,0.00000000,90.57128906,1.15905762); //object(kmb_bpress) (3)
  1366. CreateObject(2913,1461.80004883,-2880.80004883,13.19999981,0.00000000,90.57128906,1.15905762); //object(kmb_bpress) (4)
  1367. CreateObject(2913,1463.80004883,-2880.80004883,13.19999981,0.00000000,90.57128906,1.15905762); //object(kmb_bpress) (5)
  1368. CreateObject(2913,1467.40002441,-2892.00000000,13.19999981,0.00000000,90.57128906,354.19171143); //object(kmb_bpress) (6)
  1369. CreateObject(2913,1464.69995117,-2891.89990234,13.19999981,0.00000000,90.56579590,354.18823242); //object(kmb_bpress) (7)
  1370. CreateObject(2913,1464.80004883,-2890.60009766,13.19999981,0.00000000,90.56579590,354.18823242); //object(kmb_bpress) (8)
  1371. CreateObject(2913,1467.30004883,-2890.60009766,13.19999981,0.00000000,90.56579590,354.18823242); //object(kmb_bpress) (9)
  1372. CreateObject(1616,1461.90002441,-2895.50000000,16.29999924,0.00000000,0.00000000,0.00000000); //object(nt_securecam1_01) (1)
  1373. CreateObject(1616,1477.40002441,-2895.19995117,16.29999924,0.00000000,0.00000000,0.00000000); //object(nt_securecam1_01) (2)
  1374. CreateObject(1616,1428.09997559,-2848.10009766,17.20000076,0.00000000,0.00000000,344.47344971); //object(nt_securecam1_01) (3)
  1375. CreateObject(1616,1395.50000000,-2907.50000000,17.20000076,0.00000000,0.00000000,242.08612061); //object(nt_securecam1_01) (4)
  1376. CreateObject(1216,1480.80004883,-2894.69995117,13.60000038,0.00000000,0.00000000,176.23266602); //object(phonebooth1) (1)
  1377. CreateObject(1216,1480.79980469,-2894.69921875,13.60000038,0.00000000,0.00000000,176.23168945); //object(phonebooth1) (2)
  1378. CreateObject(1216,1480.09997559,-2894.60009766,13.60000038,0.00000000,0.00000000,176.23168945); //object(phonebooth1) (3)
  1379. CreateObject(1216,1479.40002441,-2894.50000000,13.60000038,0.00000000,0.00000000,176.23168945); //object(phonebooth1) (4)
  1380. CreateObject(1216,1478.69995117,-2894.39990234,13.60000038,0.00000000,0.00000000,176.23168945); //object(phonebooth1) (5)
  1381. CreateObject(1231,1455.50000000,-2887.60009766,15.69999981,0.00000000,0.00000000,90.83685303); //object(streetlamp2) (1)
  1382. CreateObject(1231,1473.59997559,-2887.60009766,15.69999981,0.00000000,0.00000000,86.19006348); //object(streetlamp2) (2)
  1383. CreateObject(1231,1474.00000000,-2866.19995117,15.69999981,0.00000000,0.00000000,86.18774414); //object(streetlamp2) (3)
  1384. CreateObject(3279,1346.90002441,-2846.80004883,12.69999981,0.00000000,0.00000000,266.10949707); //object(a51_spottower) (1)
  1385. CreateObject(3279,1341.00000000,-2935.19995117,12.80000019,0.00000000,0.00000000,356.51623535); //object(a51_spottower) (3)
  1386. CreateObject(3504,1489.59997559,-2890.80004883,14.30000019,0.00000000,0.00000000,86.92254639); //object(vgsn_portaloo) (1)
  1387. CreateObject(3504,1489.80004883,-2889.00000000,14.30000019,0.00000000,0.00000000,86.91833496); //object(vgsn_portaloo) (2)
  1388. CreateObject(3504,1490.09997559,-2887.19995117,14.30000019,0.00000000,0.00000000,86.91833496); //object(vgsn_portaloo) (3)
  1389. CreateObject(3504,1490.19995117,-2885.19995117,14.30000019,0.00000000,0.00000000,86.91833496); //object(vgsn_portaloo) (4)
  1390. CreateObject(8673,1483.80004883,-2880.10009766,14.39999962,0.00000000,0.00000000,0.00000000); //object(csrsfence03_lvs) (4)
  1391. CreateObject(14791,1485.09997559,-2862.69995117,15.00000000,0.00000000,0.00000000,355.72045898); //object(a_vgsgymboxa) (1)
  1392. CreateObject(14791,1484.69995117,-2872.10009766,15.00000000,0.00000000,0.00000000,355.71533203); //object(a_vgsgymboxa) (2)
  1393. CreateObject(1280,1473.50000000,-2861.00000000,13.30000019,0.00000000,0.00000000,175.36718750); //object(parkbench1) (5)
  1394. CreateObject(1280,1473.00000000,-2869.10009766,13.30000019,0.00000000,0.00000000,175.36376953); //object(parkbench1) (6)
  1395. CreateObject(1280,1472.80004883,-2873.30004883,13.30000019,0.00000000,0.00000000,175.36376953); //object(parkbench1) (7)
  1396. CreateObject(1280,1476.80004883,-2879.10009766,13.30000019,0.00000000,0.00000000,266.56579590); //object(parkbench1) (8)
  1397. CreateObject(1280,1481.80004883,-2879.50000000,13.30000019,0.00000000,0.00000000,267.72253418); //object(parkbench1) (9)
  1398. CreateObject(1280,1479.40002441,-2855.50000000,13.30000019,0.00000000,0.00000000,86.91470337); //object(parkbench1) (10)
  1399. CreateObject(1280,1486.00000000,-2855.69995117,13.30000019,0.00000000,0.00000000,86.91284180); //object(parkbench1) (11)
  1400. CreateObject(3666,1361.19995117,-2961.10009766,2.40000010,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (3)
  1401. CreateObject(3666,1413.59997559,-2965.30004883,2.40000010,0.00000000,0.00000000,0.00000000); //object(airuntest_las) (6)
  1402. CreateObject(715,1385.59997559,-2857.69995117,21.20000076,0.00000000,0.00000000,356.51623535); //object(veg_bevtree3) (1)
  1403. CreateObject(715,1383.40002441,-2878.80004883,21.29999924,0.00000000,0.00000000,356.51184082); //object(veg_bevtree3) (2)
  1404. CreateObject(715,1411.90002441,-2925.80004883,21.10000038,0.00000000,0.00000000,356.51623535); //object(veg_bevtree3) (3)
  1405. CreateObject(715,1391.00000000,-2924.39990234,21.10000038,0.00000000,0.00000000,356.51184082); //object(veg_bevtree3) (4)
  1406. CreateObject(715,1371.30004883,-2922.80004883,21.10000038,0.00000000,0.00000000,356.51184082); //object(veg_bevtree3) (5)
  1407. CreateObject(715,1411.89941406,-2925.79980469,21.10000038,0.00000000,0.00000000,356.51184082); //object(veg_bevtree3) (6)
  1408. CreateObject(715,1385.59960938,-2857.69921875,21.20000076,0.00000000,0.00000000,356.51184082); //object(veg_bevtree3) (7)
  1409. return 1;
  1410. }
  1411. public OnGameModeExit()
  1412. {
  1413. return 1;
  1414. }
  1415. public OnPlayerConnect(playerid)
  1416. {
  1417. if(!IsValidName(playerid))
  1418. {
  1419. SCM(playerid,COLOR_RED,"Please change your name into the following format: Firstname_Lastname");
  1420. Kick(playerid);
  1421. }
  1422. new string[128];
  1423. new plname[MAX_PLAYER_NAME];
  1424. GetPlayerName(playerid, plname, sizeof(plname));
  1425. PlayerInfo[playerid][pLevel] = 0;
  1426. PlayerInfo[playerid][pCash] = 0;
  1427. PlayerInfo[playerid][pDriveLic] = 0;
  1428. PlayerInfo[playerid][pVip] = 0;
  1429. PlayerInfo[playerid][pAdmin] = 0;
  1430. PlayerInfo[playerid][pTester] = 0;
  1431. PlayerInfo[playerid][pSpawn] = 0;
  1432. PlayerInfo[playerid][pSex] = 0;
  1433. RefuelTime[playerid] = 0;
  1434. TrackCar[playerid] = 0;
  1435. PlayerInfo[playerid][pAge] = 0;
  1436. PlayerInfo[playerid][pOrigin] = 0;
  1437. PlayerInfo[playerid][pModel] = 23;
  1438. PlayerInfo[playerid][pLocked] = 0;
  1439. PlayerInfo[playerid][pExp] = 0;
  1440. PlayerInfo[playerid][pWarns] = 0;
  1441. PlayerNeedsHelp[playerid] = 0;
  1442. Mobile[playerid] = 255;
  1443. PlayerInfo[playerid][pMuted] = 0;
  1444. PlayerInfo[playerid][pMuteTime] = 0;
  1445. gPlayerTutorialing[playerid] = 0;
  1446. format(string, sizeof(string), "/Users/%s.ini", plname);
  1447. new DialogString[1024];
  1448. format(DialogString, sizeof DialogString, "%s%s%s%s%s%s%s%s", reg1, reg2, reg3, reg4, reg5, reg6, reg7, reg8);
  1449. ShowPlayerDialog(playerid,1234, DIALOG_STYLE_MSGBOX,"Introduction...", DialogString,"Accept","Refuse");
  1450. //===================================[MAPICONS]=================================
  1451. SetPlayerMapIcon(playerid, 1, 597.559509, -1249.448608, 18.307994, 52, 1);
  1452. SetPlayerMapIcon(playerid, 2, 529.425354, -1293.921752, 17.242187, 55, 1);
  1453. SetPlayerMapIcon(playerid, 3, 2127.629394, -1151.914794, 23.988607, 55, 1);
  1454. SetPlayerMapIcon(playerid, 4, 1612.057739, -1892.647338, 13.477849, 55, 1);
  1455. SetPlayerMapIcon(playerid, 5, 2102.669677, -1807.184570, 13.494323, 29, 1);
  1456. SetPlayerMapIcon(playerid, 6, 2218.005126, -1168.782226, 25.655542, 31, 1);
  1457. SetPlayerMapIcon(playerid, 7, 2229.195556, -1722.237670, 13.492409, 54, 1);
  1458. SetPlayerMapIcon(playerid, 8, 2176.778076, -1808.995361, 13.314004, 31, 1);
  1459. SetPlayerMapIcon(playerid, 9, 1552.876464, -1675.246948, 15.951610, 30, 1);
  1460. SetPlayerMapIcon(playerid, 10, 1481.554321, -1769.964111, 18.725217, 32, 1);
  1461. SetPlayerMapIcon(playerid, 11, 1931.436523, -1775.963378, 13.387728, 17, 1);
  1462. SetPlayerMapIcon(playerid, 12, 1832.088745, -1842.122924, 13.516613, 17, 1);
  1463. SetPlayerMapIcon(playerid, 13, 1834.615966, -1682.229736, 13.356820, 49, 1);
  1464. SetPlayerMapIcon(playerid, 14, 1804.492553, -1574.485961, 13.355642, 30, 1);
  1465. SetPlayerMapIcon(playerid, 15, 330.078857, -1518.715820, 35.798629, 30, 1);
  1466. SetPlayerMapIcon(playerid, 16, 212.736221, 1903.069580, 18.079984, 30, 1);
  1467. SetPlayerMapIcon(playerid, 17, 1383.189453, 465.504455, 20.192749, 17, 1);
  1468. SetPlayerMapIcon(playerid, 18, 1365.520019, 249.286941, 19.257095, 29, 1);
  1469. SetPlayerMapIcon(playerid, 19, 1315.100585, -899.391479, 39.282302, 17, 1);
  1470. SetPlayerMapIcon(playerid, 20, 2034.685791, -1404.085327, 16.970668, 22, 1);
  1471. SetPlayerMapIcon(playerid, 21, 1412.8313, -1700.3066, 13.5395, 55, 1);
  1472. //==============================================================================
  1473. Textdraw98[playerid] = TextDrawCreate(146.000000, 203.000000, " "); // Tutorial
  1474. TextDrawBackgroundColor(Textdraw98[playerid], 255);
  1475. TextDrawUseBox(Textdraw98[playerid] , 1);
  1476. TextDrawFont(Textdraw98[playerid], 1);
  1477. TextDrawBoxColor(Textdraw98[playerid] ,0x00000066);
  1478. TextDrawLetterSize(Textdraw98[playerid], 0.289899, 1.099900);
  1479. TextDrawColor(Textdraw98[playerid], 13107455);
  1480. TextDrawSetOutline(Textdraw98[playerid], 1);
  1481. TextDrawSetProportional(Textdraw98[playerid], 1);
  1482. TextDrawAlignment(Textdraw98[playerid],2);
  1483. GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
  1484. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1485. SetOriginalColor(playerid);
  1486. return 1;
  1487. }
  1488.  
  1489. public OnPlayerRequestClass(playerid, classid)
  1490. {
  1491. SetPlayerCameraPos(playerid, 1677.4528,-1502.6893,152.1802);
  1492. SetPlayerCameraLookAt(playerid, 1677.4528,-1502.6893,152.1802);
  1493. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1494. return 1;
  1495. }
  1496. //==================================[PAYDAY]====================================
  1497. public Payday()
  1498. {
  1499. for(new i = 0; i < MAX_PLAYERS; i++)
  1500. {
  1501. if(IsPlayerConnected(i))
  1502. {
  1503. new nxtlevel;
  1504. nxtlevel = PlayerInfo[i][pLevel]+1;
  1505. new string[128];
  1506. format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
  1507. GameTextForPlayer(i, string, 5000, 1);
  1508. new payday = nxtlevel*1000;
  1509. GivePlayerCash(i,payday);
  1510. PlayerInfo[i][pExp]++;
  1511. }
  1512. }
  1513. return 1;
  1514. }
  1515. //==============================================================================
  1516. public OnPlayerSpawn(playerid)
  1517. {
  1518. if(PlayerInfo[playerid][pSelected] == 0)
  1519. {
  1520. new sexthings[] = "1\tMale \n2\tFemale";
  1521. ShowPlayerDialog(playerid,155,DIALOG_STYLE_LIST,"Hello, please select your Sex:((This information is IC.))",sexthings,"Select","Leave Game");
  1522. SetPlayerPos(playerid, 1685.620117,-2331.537353,-2.679687);
  1523. gPlayerRegStep[playerid] = 1;
  1524. new randphone = 100000 + random(899999);
  1525. PlayerInfo[playerid][pNumber] = randphone;
  1526. return 1;
  1527. }
  1528. if(PlayerInfo[playerid][pFirstJoined] == 0)
  1529. {
  1530. new string[512];
  1531. gPlayerTutorialing[playerid] = 1;
  1532. SetPlayerHealth(playerid,100);
  1533. SetPlayerPos(playerid,1693.0609,-2292.1968,-1.2228);
  1534. SetPlayerCameraPos(playerid,1668.9324,-2285.8130,21.3266);//The airport
  1535. SetPlayerCameraLookAt(playerid,1693.0609,-2292.1968,-1.2228);
  1536. format(string,sizeof(string),"This is the airport,your first spawn place ~n~ You will be able to change it if~n~you will get into a faction~n~or if you will buy a house~n~Basic Commands:/help.");
  1537. TextDrawSetString(Textdraw98[playerid],string);
  1538. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1539. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1540. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1541. return 1;
  1542. }
  1543. if(gPlayerLogged[playerid] == 0)
  1544. {
  1545. SendClientMessage(playerid, COLOR_LIGHTRED, "** This server requires a Login BEFORE spawn (Kicked) **");
  1546. Kick(playerid);
  1547. }
  1548. SetPlayerPos(playerid, 1685.620117,-2331.537353,-2.679687);
  1549. SetPlayerInterior(playerid,0);
  1550. SetPlayerVirtualWorld(playerid, 0);
  1551. SetOriginalColor(playerid);
  1552. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  1553. return 1;
  1554. }
  1555. public OnPlayerDisconnect(playerid, reason)
  1556. {
  1557. new INI:File = INI_Open(UserPath(playerid));
  1558. INI_SetTag(File,"data");
  1559. INI_WriteInt(File, "Level",PlayerInfo[playerid][pLevel]);
  1560. INI_WriteInt(File, "Money",PlayerInfo[playerid][pCash]);
  1561. INI_WriteInt(File, "Admin",PlayerInfo[playerid][pAdmin]);
  1562. INI_WriteInt(File, "Tester",PlayerInfo[playerid][pTester]);
  1563. INI_WriteInt(File, "Vip",PlayerInfo[playerid][pVip]);
  1564. INI_WriteInt(File, "Spawn",PlayerInfo[playerid][pSpawn]);
  1565. INI_WriteInt(File, "Model",PlayerInfo[playerid][pModel]);
  1566. INI_WriteInt(File, "Locked",PlayerInfo[playerid][pLocked]);
  1567. INI_WriteInt(File, "FirstJoined", PlayerInfo[playerid][pFirstJoined]);
  1568. INI_WriteInt(File, "Sex", PlayerInfo[playerid][pSex]);
  1569. INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge]);
  1570. INI_WriteInt(File, "Origin", PlayerInfo[playerid][pOrigin]);
  1571. INI_WriteInt(File, "Respect", PlayerInfo[playerid][pExp]);
  1572. INI_WriteInt(File, "Warns", PlayerInfo[playerid][pWarns]);
  1573. INI_WriteInt(File, "Selected", PlayerInfo[playerid][pSelected]);
  1574. INI_WriteInt(File, "Continent", PlayerInfo[playerid][pPlace]);
  1575. INI_WriteInt(File, "Muted", PlayerInfo[playerid][pMuted]);
  1576. INI_WriteInt(File, "MuteTime", PlayerInfo[playerid][pMuteTime]);
  1577. INI_WriteInt(File, "Ph", PlayerInfo[playerid][pNumber]);
  1578. INI_WriteInt(File, "DriveLic", PlayerInfo[playerid][pDriveLic]);
  1579. INI_Close(File);
  1580. return 1;
  1581. }
  1582.  
  1583. public OnPlayerStateChange(playerid, newstate, oldstate)
  1584. {
  1585. //==================================DEALERSHIP=====================================
  1586. if(IsPlayerInAnyVehicle(playerid) && !IsBicycle(GetPlayerVehicleID(playerid)))
  1587. {
  1588. new vehicleid = GetPlayerVehicleID(playerid);
  1589. if(VehicleSecurity[vehicleid] == 1)
  1590. {
  1591. ToggleAlarm(vehicleid, VEHICLE_PARAMS_ON);
  1592. SetTimerEx("StopAlarm", ALARM_TIME, false, "d", vehicleid);
  1593. }
  1594. }
  1595. else
  1596. {
  1597. }
  1598. if(newstate == PLAYER_STATE_DRIVER)
  1599. {
  1600. new car = GetPlayerVehicleID(playerid);
  1601. if(car == dmvc || car == dmvc1 || car == dmvc2)
  1602. {
  1603. SCM(playerid, COLOR_GOLD,"Type /takeexam to start the Drivers License test or /exitcar to exit");
  1604. }
  1605. else
  1606. {
  1607. if(PlayerInfo[playerid][pDriveLic] < 1)
  1608. {
  1609. SendClientMessage(playerid, COLOR_GREY, "Get a driving license from DMV, read the newspaper !");
  1610. TogglePlayerControllable(playerid, 0);
  1611. }
  1612. }
  1613. new vehicleid = GetPlayerVehicleID(playerid);
  1614. new id = GetVehicleID(vehicleid);
  1615. if(IsValidVehicle(id))
  1616. {
  1617. if(VehicleCreated[id] == VEHICLE_DEALERSHIP)
  1618. {
  1619. SetPVarInt(playerid, "DialogValue1", id);
  1620. ShowDialog(playerid, DIALOG_VEHICLE_BUY);
  1621. return 1;
  1622. }
  1623. }
  1624. if(IsBicycle(vehicleid))
  1625. {
  1626. ToggleEngine(vehicleid, VEHICLE_PARAMS_ON);
  1627. }
  1628. if(Fuel[vehicleid] <= 0)
  1629. {
  1630. ToggleEngine(vehicleid, VEHICLE_PARAMS_OFF);
  1631. }
  1632. //=======================================ENGINE=================================
  1633. if(vehEngine[vehicleid] == 0)
  1634. {
  1635. TogglePlayerControllable(playerid, 0);
  1636. SendClientMessage(playerid, COLOR_GOLD, "To start the vehicle's engine press \"Shift\" or type \"/engine\"");
  1637. }
  1638. else if(vehEngine[vehicleid] == 1)
  1639. {
  1640. TogglePlayerControllable(playerid, 1);
  1641. SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine running");
  1642. }
  1643. }
  1644. return 1;
  1645. }
  1646. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  1647. {
  1648. new string[512];
  1649. if(PRESSED(KEY_SPRINT))
  1650. {
  1651. if(gPlayerTutorialing[playerid] >= 1)
  1652. {
  1653. if(gPlayerTutorialing[playerid] == 1)
  1654. {
  1655. gPlayerTutorialing[playerid] = 2;
  1656. SetPlayerPos(playerid,1412.8313, -1700.3066, 13.5395);
  1657. SetPlayerCameraPos(playerid,1412.8313, -1700.3066, 13.5395);//Driving School
  1658. SetPlayerCameraLookAt(playerid,1412.8313, -1700.3066, 13.5395);
  1659. format(string,sizeof(string),"This is the Driving School,you will be able ~n~to take a drive test wich will cost you~n~500$ so you will get a Driving License.~n~REMEBER:The police stops you if you~n~don't have one.");
  1660. TextDrawSetString(Textdraw98[playerid],string);
  1661. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1662. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1663. return 1;
  1664. }
  1665. if(gPlayerTutorialing[playerid] == 2)
  1666. {
  1667. gPlayerTutorialing[playerid] = 3;
  1668. SetPlayerPos(playerid,1380.7892,-1088.5284,27.3844);
  1669. SetPlayerCameraPos(playerid,1349.7155,-1115.9375,47.7593);//Jobs Building
  1670. SetPlayerCameraLookAt(playerid,1380.7892,-1088.5284,27.3844);
  1671. format(string,sizeof(string),"If you want to earn money,you will be able to ~n~get a job.There will be a list so you~n~will have to choose one job.~n~REMEBER:Some of these jobs requests~n~a owned vehicle!");
  1672. TextDrawSetString(Textdraw98[playerid],string);
  1673. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1674. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1675. return 1;
  1676. }
  1677. if(gPlayerTutorialing[playerid] == 3)
  1678. {
  1679. gPlayerTutorialing[playerid] = 4;
  1680. SetPlayerPos(playerid,1482.2841,-1025.5725,24.352);
  1681. SetPlayerCameraPos(playerid,1522.6703,-1041.8273,60.2691);//Casino
  1682. SetPlayerCameraLookAt(playerid,1482.2841,-1025.5725,24.3520);
  1683. format(string,sizeof(string),"If you got tired of working ~n~for someone or for your job~n~you have the possibility to play.~n~here,at the Casino!~n~Commands:/casino");
  1684. TextDrawSetString(Textdraw98[playerid],string);
  1685. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1686. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1687. return 1;
  1688. }
  1689. if(gPlayerTutorialing[playerid] == 4)
  1690. {
  1691. gPlayerTutorialing[playerid] = 5;
  1692. SetPlayerPos(playerid,590.7849,-1243.1808,17.9521);
  1693. SetPlayerCameraPos(playerid,609.0580,-1219.5914,29.2979);//Bank
  1694. SetPlayerCameraLookAt(playerid,590.7849,-1243.1808,17.9521);
  1695. format(string,sizeof(string),"Your paydays,your money will be deposited ~n~here,at the Bank.~n~You have the possibility to:.~n~/bank deposit,withdraw,transfer,savings,etc.~n~Remember:Minimum savings value:50.000$.");
  1696. TextDrawSetString(Textdraw98[playerid],string);
  1697. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1698. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1699. return 1;
  1700. }
  1701. if(gPlayerTutorialing[playerid] == 5)
  1702. {
  1703. gPlayerTutorialing[playerid] = 6;
  1704. SetPlayerPos(playerid,543.6426,-1277.8851,17.2422);
  1705. SetPlayerCameraPos(playerid,538.1927,-1259.2106,29.4667);//Grotti Dealership
  1706. SetPlayerCameraLookAt(playerid,543.6426,-1277.8851,17.2422);
  1707. format(string,sizeof(string),"If you have enough money,you will ~n~be able to buy a new car.");
  1708. TextDrawSetString(Textdraw98[playerid],string);
  1709. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1710. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1711. return 1;
  1712. }
  1713. if(gPlayerTutorialing[playerid] == 6)
  1714. {
  1715. gPlayerTutorialing[playerid] = 7;
  1716. SetPlayerPos(playerid,617.2159,-1330.5415,13.6447);
  1717. SetPlayerCameraPos(playerid,652.8370,-1335.8909,28.2059);//Sector 1 Jail
  1718. SetPlayerCameraLookAt(playerid,617.2159,-1330.5415,13.6447);
  1719. format(string,sizeof(string),"If the police officers catch you ~n~they will jail you in one~n~of the jails around the city.");
  1720. TextDrawSetString(Textdraw98[playerid],string);
  1721. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1722. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1723. return 1;
  1724. }
  1725. if(gPlayerTutorialing[playerid] == 7)
  1726. {
  1727. gPlayerTutorialing[playerid] = 8;
  1728. SetPlayerPos(playerid,1187.1349,-1323.7538,13.5591);
  1729. SetPlayerCameraPos(playerid,1206.7904,-1365.1343,27.3433);//Al Saints Hospital
  1730. SetPlayerCameraLookAt(playerid,1187.1349,-1323.7538,13.5591);
  1731. format(string,sizeof(string),"If you die,you will be asked to /accept death ~n~.When your really dead ,you will be ~n~spawned here,at Al Saints Hospital.");
  1732. TextDrawSetString(Textdraw98[playerid],string);
  1733. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1734. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1735. return 1;
  1736. }
  1737. if(gPlayerTutorialing[playerid] == 8)
  1738. {
  1739. gPlayerTutorialing[playerid] = 9;
  1740. SetPlayerPos(playerid,1479.8079,-1674.9541,14.6260);
  1741. SetPlayerCameraPos(playerid,1396.1614,-1650.0144,59.4351);//Pershing Square
  1742. SetPlayerCameraLookAt(playerid,1479.8079,-1674.9541,14.6260);
  1743. format(string,sizeof(string),"This place is the most ~n~ safest place in Los Santos.~n~You have no right to kill/rob/rape noone here");
  1744. TextDrawSetString(Textdraw98[playerid],string);
  1745. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1746. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1747. return 1;
  1748. }
  1749. if(gPlayerTutorialing[playerid] == 9)
  1750. {
  1751. gPlayerTutorialing[playerid] = 0;
  1752. PlayerInfo[playerid][pFirstJoined] = 1;
  1753. PlayerInfo[playerid][pSelected] = 0;
  1754. SpawnPlayer(playerid);
  1755. SetPlayerVirtualWorld(playerid,0);
  1756. TextDrawHideForPlayer(playerid,Textdraw98[playerid]);
  1757. SetCameraBehindPlayer(playerid);
  1758. TogglePlayerControllable(playerid, 1);
  1759. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Now we will need some data from you!.");
  1760. return 1;
  1761. }
  1762. }
  1763. }
  1764.  
  1765.  
  1766. if(PRESSED(KEY_JUMP))
  1767. {
  1768. if(gPlayerTutorialing[playerid] >= 1)
  1769. {
  1770. if(gPlayerTutorialing[playerid] == 9)
  1771. {
  1772. gPlayerTutorialing[playerid] = 8;
  1773. SetPlayerPos(playerid,1187.1349,-1323.7538,13.5591);
  1774. SetPlayerCameraPos(playerid,1206.7904,-1365.1343,27.3433);//Al Saints Hospital
  1775. SetPlayerCameraLookAt(playerid,1187.1349,-1323.7538,13.5591);
  1776. format(string,sizeof(string),"If you die,you will be asked to /accept death ~n~.When your really dead ,you will be ~n~spawned here,at Al Saints Hospital.");
  1777. TextDrawSetString(Textdraw98[playerid],string);
  1778. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1779. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1780. return 1;
  1781. }
  1782. if(gPlayerTutorialing[playerid] == 8)
  1783. {
  1784. gPlayerTutorialing[playerid] = 7;
  1785. SetPlayerPos(playerid,617.2159,-1330.5415,13.6447);
  1786. SetPlayerCameraPos(playerid,652.8370,-1335.8909,28.2059);//Sector 1 Jail
  1787. SetPlayerCameraLookAt(playerid,617.2159,-1330.5415,13.6447);
  1788. format(string,sizeof(string),"If the police officers catch you ~n~they will jail you in one~n~of the jails around the city.");
  1789. TextDrawSetString(Textdraw98[playerid],string);
  1790. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1791. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1792. return 1;
  1793. }
  1794. if(gPlayerTutorialing[playerid] == 7)
  1795. {
  1796. gPlayerTutorialing[playerid] = 6;
  1797. SetPlayerPos(playerid,543.6426,-1277.8851,17.2422);
  1798. SetPlayerCameraPos(playerid,538.1927,-1259.2106,29.4667);//Grotti Dealership
  1799. SetPlayerCameraLookAt(playerid,543.6426,-1277.8851,17.2422);
  1800. format(string,sizeof(string),"If you have enough money,you will ~n~be able to buy a new car.~n~Command:/v.");
  1801. TextDrawSetString(Textdraw98[playerid],string);
  1802. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1803. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1804. return 1;
  1805. }
  1806. if(gPlayerTutorialing[playerid] == 6)
  1807. {
  1808. gPlayerTutorialing[playerid] = 5;
  1809. SetPlayerPos(playerid,590.7849,-1243.1808,17.9521);
  1810. SetPlayerCameraPos(playerid,609.0580,-1219.5914,29.2979);//Bank
  1811. SetPlayerCameraLookAt(playerid,590.7849,-1243.1808,17.9521);
  1812. format(string,sizeof(string),"Your paydays,your money will be deposited ~n~here,at the Bank.~n~You have the possibility to:.~n~/bank deposit,withdraw,transfer,savings,etc.~n~Remember:Minimum savings value:50.000$.");
  1813. TextDrawSetString(Textdraw98[playerid],string);
  1814. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1815. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1816. return 1;
  1817. }
  1818. if(gPlayerTutorialing[playerid] == 5)
  1819. {
  1820. gPlayerTutorialing[playerid] = 4;
  1821. SetPlayerPos(playerid,1482.2841,-1025.5725,24.352);
  1822. SetPlayerCameraPos(playerid,1522.6703,-1041.8273,60.2691);//Casino
  1823. SetPlayerCameraLookAt(playerid,1482.2841,-1025.5725,24.3520);
  1824. format(string,sizeof(string),"If you got tired of working ~n~for someone or for your job~n~you have the possibility to play.~n~here,at the Casino!~n~Commands:/casino");
  1825. TextDrawSetString(Textdraw98[playerid],string);
  1826. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1827. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1828. return 1;
  1829. }
  1830. if(gPlayerTutorialing[playerid] == 4)
  1831. {
  1832. gPlayerTutorialing[playerid] = 3;
  1833. SetPlayerPos(playerid,1380.7892,-1088.5284,27.3844);
  1834. SetPlayerCameraPos(playerid,1349.7155,-1115.9375,47.7593);//Jobs Building
  1835. SetPlayerCameraLookAt(playerid,1380.7892,-1088.5284,27.3844);
  1836. format(string,sizeof(string),"If you want to earn money,you will be able to ~n~get a job.There will be a list so you~n~will have to choose one job.~n~REMEBER:Some of these jobs requests~n~a owned vehicle!");
  1837. TextDrawSetString(Textdraw98[playerid],string);
  1838. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1839. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1840. return 1;
  1841. }
  1842. if(gPlayerTutorialing[playerid] == 3)
  1843. {
  1844. gPlayerTutorialing[playerid] = 2;
  1845. SetPlayerPos(playerid,1412.8313, -1700.3066, 13.5395);
  1846. SetPlayerCameraPos(playerid,1412.8313, -1700.3066, 13.5395);//Driving School
  1847. SetPlayerCameraLookAt(playerid,1412.8313, -1700.3066, 13.5395);
  1848. format(string,sizeof(string),"This is the Driving School,you will be able ~n~to take a drive test wich will cost you~n~5.000$ so you will get a Driving License.~n~REMEBER:The police stops you if you~n~don't have one.");
  1849. TextDrawSetString(Textdraw98[playerid],string);
  1850. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1851. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1852. return 1;
  1853. }
  1854. if(gPlayerTutorialing[playerid] == 2)
  1855. {
  1856. gPlayerTutorialing[playerid] = 1;
  1857. SetPlayerPos(playerid,1479.8079,-1674.9541,14.6260);
  1858. SetPlayerCameraPos(playerid,1396.1614,-1650.0144,59.4351);//Pershing Square
  1859. SetPlayerCameraLookAt(playerid,1479.8079,-1674.9541,14.6260);
  1860. format(string,sizeof(string),"This place is the most ~n~ safest place in Los Santos.~n~You have no right to kill/rob/rape noone here");
  1861. TextDrawSetString(Textdraw98[playerid],string);
  1862. TextDrawShowForPlayer(playerid,Textdraw98[playerid]);
  1863. SendClientMessage(playerid,COLOR_WHITE,"{248B10}Tutorial:{FFFFFF}Use SPACEBAR to continue,SHIFT to go back.");
  1864. return 1;
  1865. }
  1866. }
  1867. }
  1868. //==================================ENGINE======================================
  1869. new vehicleid = GetPlayerVehicleID(playerid);
  1870. if(IsPlayerInAnyVehicle(playerid))
  1871. {
  1872. if(vehEngine[vehicleid] == 0)
  1873. {
  1874. if(newkeys == KEY_JUMP)
  1875. {
  1876. new vid, sendername[MAX_PLAYER_NAME], vmodel[128];
  1877. vehEngine[vehicleid] = 2;
  1878. SetTimerEx("StartEngine", 3000, 0, "i", playerid);
  1879. SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine starting");
  1880. vid = GetPlayerVehicleID(playerid);
  1881. GetVehicleName(vid,vmodel,sizeof(vmodel));
  1882. GetPlayerName(playerid,sendername,sizeof(sendername));
  1883. format(string, sizeof(string), "* %s is starting the engine of the %s", sendername, vmodel);
  1884. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  1885. }
  1886. if(newkeys == KEY_SECONDARY_ATTACK)
  1887. {
  1888. RemovePlayerFromVehicle(playerid);
  1889. TogglePlayerControllable(playerid, 1);
  1890. }
  1891. }
  1892. }
  1893. return 1;
  1894. }
  1895. //========================================DEALERSHIP============================
  1896. public OnVehicleMod(playerid, vehicleid, componentid)
  1897. {
  1898. new id = GetVehicleID(vehicleid);
  1899. if(IsValidVehicle(id))
  1900. {
  1901. VehicleMods[id][GetVehicleComponentType(componentid)] = componentid;
  1902. SaveVehicle(id);
  1903. }
  1904. return 1;
  1905. }
  1906.  
  1907. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  1908. {
  1909. new id = GetVehicleID(vehicleid);
  1910. if(IsValidVehicle(id))
  1911. {
  1912. VehiclePaintjob[id] = paintjobid;
  1913. SaveVehicle(id);
  1914. }
  1915. return 1;
  1916. }
  1917.  
  1918. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  1919. {
  1920. new id = GetVehicleID(vehicleid);
  1921. if(IsValidVehicle(id))
  1922. {
  1923. VehicleColor[id][0] = color1;
  1924. VehicleColor[id][1] = color2;
  1925. SaveVehicle(id);
  1926. }
  1927. return 1;
  1928. }
  1929.  
  1930. ShowDialog(playerid, dialogid)
  1931. {
  1932. switch(dialogid)
  1933. {
  1934. case DIALOG_VEHICLE:
  1935. {
  1936. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  1937. new caption[32], info[256];
  1938. format(caption, sizeof(caption), "Vehicle ID %d", vehicleid);
  1939. strcat(info, "\nTrunk", sizeof(info));
  1940. strcat(info, "\nFill Tank", sizeof(info));
  1941. switch(GetPlayerVehicleAccess(playerid, vehicleid))
  1942. {
  1943. case 1:
  1944. {
  1945. new value = VehicleValue[vehicleid]/2;
  1946. format(info, sizeof(info), "%s\nSell Vehicle ($%d)\nPark Vehicle\nEdit License Plate", info, value);
  1947. }
  1948. }
  1949. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, caption, info, "Select", "Cancel");
  1950. }
  1951. case DIALOG_VEHICLE_BUY:
  1952. {
  1953. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  1954. new caption[32], info[256];
  1955. format(caption, sizeof(caption), "Vehicle ID %d", vehicleid);
  1956. format(info, sizeof(info), "This vehicle is for sale ($%d)\nWould you like to buy it?", VehicleValue[vehicleid]);
  1957. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, caption, info, "Yes", "No");
  1958. }
  1959. case DIALOG_VEHICLE_SELL:
  1960. {
  1961. new targetid = GetPVarInt(playerid, "DialogValue1");
  1962. new id = GetPVarInt(playerid, "DialogValue2");
  1963. new price = GetPVarInt(playerid, "DialogValue3");
  1964. new info[256];
  1965. format(info, sizeof(info), "%s (%d) wants to sell you a %s for $%d.", PlayerName(targetid), targetid,
  1966. VehicleNames[VehicleModel[id]-400], price);
  1967. strcat(info, "\n\nWould you like to buy?", sizeof(info));
  1968. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_MSGBOX, "Buy Vehicle", info, "Yes", "No");
  1969. }
  1970. case DIALOG_TRUNK:
  1971. {
  1972. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  1973. new name[32], info[256];
  1974. for(new i=0; i < sizeof(VehicleTrunk[]); i++)
  1975. {
  1976. if(VehicleTrunk[vehicleid][i][1] > 0)
  1977. {
  1978. GetWeaponName(VehicleTrunk[vehicleid][i][0], name, sizeof(name));
  1979. format(info, sizeof(info), "%s%d. %s (%d)\n", info, i+1, name, VehicleTrunk[vehicleid][i][1]);
  1980. }
  1981. else
  1982. {
  1983. format(info, sizeof(info), "%s%d. Empty\n", info, i+1);
  1984. }
  1985. }
  1986. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Trunk", info, "Select", "Cancel");
  1987. }
  1988. case DIALOG_TRUNK_ACTION:
  1989. {
  1990. new info[128];
  1991. strcat(info, "Put Into Trunk\nTake From Trunk", sizeof(info));
  1992. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Trunk", info, "Select", "Cancel");
  1993. }
  1994. case DIALOG_VEHICLE_PLATE:
  1995. {
  1996. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, "Edit License Plate", "Enter new license plate:", "Change", "Back");
  1997. }
  1998. case DIALOG_FUEL:
  1999. {
  2000. new info[128];
  2001. strcat(info, "Refuel Vehicle ($" #FUEL_PRICE ")\nBuy Gas Can ($" #GAS_CAN_PRICE ")", sizeof(info));
  2002. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Fuel Station", info, "OK", "Cancel");
  2003. }
  2004. case DIALOG_EDITVEHICLE:
  2005. {
  2006. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  2007. new caption[32], info[256];
  2008. format(caption, sizeof(caption), "Edit Vehicle ID %d", vehicleid);
  2009. format(info, sizeof(info), "1. Value: [$%d]\n2. Model: [%d (%s)]\n3. Colors: [%d] [%d]\n4. License Plate: [%s]",
  2010. VehicleValue[vehicleid], VehicleModel[vehicleid], VehicleNames[VehicleModel[vehicleid]-400],
  2011. VehicleColor[vehicleid][0], VehicleColor[vehicleid][1], VehicleNumberPlate[vehicleid]);
  2012. strcat(info, "\n5. Delete Vehicle\n6. Park Vehicle\n7. Go To Vehicle", sizeof(info));
  2013. strcat(info, "\n\nEnter: [nr] [value1] [value2]", sizeof(info));
  2014. ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_INPUT, caption, info, "OK", "Cancel");
  2015. }
  2016. }
  2017. }
  2018. public OnVehicleSpawn(vehicleid)
  2019. {
  2020. VehicleSecurity[vehicleid] = 0;
  2021. new id = GetVehicleID(vehicleid);
  2022. if(IsValidVehicle(id))
  2023. {
  2024. if(VehicleColor[id][0] >= 0 && VehicleColor[id][1] >= 0)
  2025. ChangeVehicleColor(vehicleid, VehicleColor[id][0], VehicleColor[id][1]);
  2026. LinkVehicleToInterior(vehicleid, VehicleInterior[id]);
  2027. SetVehicleVirtualWorld(vehicleid, VehicleWorld[id]);
  2028. for(new i=0; i < sizeof(VehicleMods[]); i++)
  2029. {
  2030. AddVehicleComponent(vehicleid, VehicleMods[id][i]);
  2031. }
  2032. ChangeVehiclePaintjob(vehicleid, VehiclePaintjob[id]);
  2033. }
  2034. return 1;
  2035. }
  2036. public MainTimer()
  2037. {
  2038. new string[128];
  2039. new Float:x, Float:y, Float:z;
  2040.  
  2041. for(new i=0; i < MAX_PLAYERS; i++)
  2042. {
  2043. if(IsPlayerConnected(i))
  2044. {
  2045. if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
  2046. {
  2047. new vehicleid = GetPlayerVehicleID(i);
  2048. if(!IsBicycle(vehicleid) && Fuel[vehicleid] > 0)
  2049. {
  2050. if(Fuel[vehicleid] <= 0)
  2051. {
  2052. ToggleEngine(vehicleid, VEHICLE_PARAMS_OFF);
  2053. GameTextForPlayer(i, "~r~out of fuel", 3000, 3);
  2054. SendClientMessage(i, COLOR_RED, "This vehicle is out of fuel!");
  2055. }
  2056. }
  2057. }
  2058. if(RefuelTime[i] > 0 && GetPVarInt(i, "FuelStation"))
  2059. {
  2060. new vehicleid = GetPlayerVehicleID(i);
  2061. Fuel[vehicleid] += 2.0;
  2062. RefuelTime[i]--;
  2063. if(RefuelTime[i] == 0)
  2064. {
  2065. if(Fuel[vehicleid] >= 100.0) Fuel[vehicleid] = 100.0;
  2066. new stationid = GetPVarInt(i, "FuelStation");
  2067. new cost = floatround(Fuel[vehicleid]-GetPVarFloat(i, "Fuel"))*FUEL_PRICE;
  2068. if(GetPlayerState(i) != PLAYER_STATE_DRIVER || Fuel[vehicleid] >= 100.0 || GetPlayerMoney(i) < cost
  2069. || !IsPlayerInRangeOfPoint(i, 10.0, FuelStationPos[stationid][0], FuelStationPos[stationid][1], FuelStationPos[stationid][2]))
  2070. {
  2071. if(GetPlayerMoney(i) < cost) cost = GetPlayerMoney(i);
  2072. GivePlayerCash(i, -cost);
  2073. format(string, sizeof(string), "~r~-$%d", cost);
  2074. GameTextForPlayer(i, string, 2000, 3);
  2075. format(string, sizeof(string), "You pay $%d for fuel", cost);
  2076. SendClientMessage(i, COLOR_WHITE, string);
  2077. SetPVarInt(i, "FuelStation", 0);
  2078. SetPVarFloat(i, "Fuel", 0.0);
  2079. }
  2080. else
  2081. {
  2082. RefuelTime[i] = 5;
  2083. format(string, sizeof(string), "~w~refueling...~n~~r~-$%d", cost);
  2084. GameTextForPlayer(i, string, 2000, 3);
  2085. }
  2086. }
  2087. }
  2088. if(TrackCar[i])
  2089. {
  2090. GetVehiclePos(TrackCar[i], x, y, z);
  2091. SetPlayerCheckpoint(i, x, y, z, 3);
  2092. }
  2093. }
  2094. }
  2095. }
  2096. public SaveTimer()
  2097. {
  2098. SaveVehicleIndex++;
  2099. if(SaveVehicleIndex >= MAX_DVEHICLES) SaveVehicleIndex = 1;
  2100. if(IsValidVehicle(SaveVehicleIndex)) SaveVehicle(SaveVehicleIndex);
  2101. }
  2102.  
  2103. public StopAlarm(vehicleid)
  2104. {
  2105. ToggleAlarm(vehicleid, VEHICLE_PARAMS_OFF);
  2106. }
  2107. //====================================ENGINE====================================
  2108. public StartEngine(playerid)
  2109. {
  2110. new vehicleid = GetPlayerVehicleID(playerid);
  2111. new Float:health;
  2112. new rand = random(2);
  2113. GetVehicleHealth(vehicleid, health);
  2114. if(IsPlayerInAnyVehicle(playerid))
  2115. {
  2116. if(vehEngine[vehicleid] == 2)
  2117. {
  2118. if(health > 300)
  2119. {
  2120. if(rand == 0)
  2121. {
  2122. vehEngine[vehicleid] = 1;
  2123. TogglePlayerControllable(playerid, 1);
  2124. SetTimerEx("DamagedEngine", 1000, 1, "i", playerid);
  2125. SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine started");
  2126. }
  2127. if(rand == 1)
  2128. {
  2129. vehEngine[vehicleid] = 0;
  2130. TogglePlayerControllable(playerid, 0);
  2131. SendClientMessage(playerid, COLOR_RED, "Vehicle engine failed to start");
  2132. }
  2133. }
  2134. else
  2135. {
  2136. vehEngine[vehicleid] = 0;
  2137. TogglePlayerControllable(playerid, 0);
  2138. SendClientMessage(playerid, COLOR_RED, "Vehicle engine failed to start due to damage");
  2139. }
  2140. }
  2141. }
  2142. return 1;
  2143. }
  2144.  
  2145. public DamagedEngine(playerid)
  2146. {
  2147. new vehicleid = GetPlayerVehicleID(playerid);
  2148. new Float:health;
  2149. GetVehicleHealth(vehicleid, health);
  2150. if(IsPlayerInAnyVehicle(playerid))
  2151. {
  2152. if(vehEngine[vehicleid] == 1)
  2153. {
  2154. if(health < 300)
  2155. {
  2156. vehEngine[vehicleid] = 0;
  2157. TogglePlayerControllable(playerid, 0);
  2158. SendClientMessage(playerid, COLOR_RED, "Vehicle engine stopped due to damage");
  2159. }
  2160. }
  2161. }
  2162. return 1;
  2163. }
  2164. public OnPlayerExitVehicle(playerid, vehicleid)
  2165. {
  2166. TogglePlayerControllable(playerid, 1);
  2167. return 1;
  2168. }
  2169. //==============================================================================
  2170. public FixHour(hour)
  2171. {
  2172. hour = timeshift+hour;
  2173. if (hour < 0)
  2174. {
  2175. hour = hour+24;
  2176. }
  2177. else if (hour > 23)
  2178. {
  2179. hour = hour-24;
  2180. }
  2181. shifthour = hour;
  2182. return 1;
  2183. }
  2184. public SetOriginalColor(playerid)
  2185. {
  2186. if(IsPlayerConnected(playerid))
  2187. {
  2188. SetPlayerColor(playerid, COLOR_WHITE);
  2189. }
  2190. }
  2191. public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
  2192. {
  2193. if(IsPlayerConnected(playerid))
  2194. {
  2195. new Float:oldposx, Float:oldposy, Float:oldposz;
  2196. new Float:tempposx, Float:tempposy, Float:tempposz;
  2197. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  2198. tempposx = (oldposx -x);
  2199. tempposy = (oldposy -y);
  2200. tempposz = (oldposz -z);
  2201. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  2202. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  2203. {
  2204. return 1;
  2205. }
  2206. }
  2207. return 0;
  2208. }
  2209. public ShowStats(playerid,targetid)
  2210. {
  2211. if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  2212. {
  2213. new cash = GetPlayerMoney(targetid);
  2214. new atext[20];
  2215. if(PlayerInfo[targetid][pSex] == 1)
  2216. { atext = "Male"; }
  2217. else if(PlayerInfo[targetid][pSex] == 2)
  2218. { atext = "Female"; }
  2219. new otext[20];
  2220. if(PlayerInfo[targetid][pPlace] == 1)
  2221. { otext = "Europe"; }
  2222. else if(PlayerInfo[targetid][pPlace] == 2)
  2223. { otext = "America"; }
  2224. new drank[20];
  2225. if(PlayerInfo[targetid][pVip] == 1)
  2226. { drank = "Gold Donator"; }
  2227. else if(PlayerInfo[targetid][pVip] == 2)
  2228. { drank = "Silver Donator"; }
  2229. else { drank = "None"; }
  2230. new age = PlayerInfo[targetid][pAge];
  2231. new warns = PlayerInfo[targetid][pWarns];
  2232. new level = PlayerInfo[targetid][pLevel];
  2233. new exp = PlayerInfo[targetid][pExp];
  2234. new nxtlevel = PlayerInfo[targetid][pLevel]+1;
  2235. new expamount = nxtlevel*levelexp;
  2236. new costlevel = nxtlevel*levelcost;
  2237. new name[MAX_PLAYER_NAME];
  2238. new pnumber = PlayerInfo[targetid][pNumber];
  2239. GetPlayerName(targetid, name, sizeof(name));
  2240. new Float:px,Float:py,Float:pz;
  2241. GetPlayerPos(targetid, px, py, pz);
  2242. new coordsstring[128];
  2243. SendClientMessage(playerid, COLOR_GREEN,"_____________________________________________________________________________________________");
  2244. format(coordsstring, sizeof(coordsstring),"*** %s ***",name);
  2245. SendClientMessage(playerid, COLOR_YELLOW,coordsstring);
  2246. format(coordsstring, sizeof(coordsstring), "Level:[%d] Sex:[%s] Age:[%d] Origin:[%s] Cash:[$%d] Phone:[%d] ", level,atext,age,otext, cash, pnumber);
  2247. SendClientMessage(playerid, COLOR_WHITE,coordsstring);
  2248. format(coordsstring, sizeof(coordsstring), "DonateRank:[%s] Warns:[%d/5]", drank, warns);
  2249. SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
  2250. format(coordsstring, sizeof(coordsstring), "NextLevel:[$%d] Respect:[%d/%d]",costlevel,exp,expamount);
  2251. SendClientMessage(playerid, COLOR_LIGHTBLUE,coordsstring);
  2252. SendClientMessage(playerid, COLOR_GREEN,"____________________________________________________________________________________________");
  2253. }
  2254. }
  2255.  
  2256. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2257. {
  2258. if(dialogid == 1234)
  2259. {
  2260. if(!response) return Kick(playerid);
  2261. if(response)
  2262. {
  2263. if(fexist(UserPath(playerid)))
  2264. {
  2265. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  2266. ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
  2267. }
  2268. else
  2269. {
  2270. ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
  2271. }
  2272. }
  2273. }
  2274. if(dialogid == 1)
  2275. {
  2276. if (!response) return Kick(playerid);
  2277. if(response)
  2278. {
  2279. if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
  2280. new INI:File = INI_Open(UserPath(playerid));
  2281. INI_SetTag(File,"data");
  2282. INI_WriteInt(File,"Password",udb_hash(inputtext));
  2283. INI_WriteInt(File, "Level",PlayerInfo[playerid][pLevel] = 1);
  2284. INI_WriteInt(File, "Money",PlayerInfo[playerid][pCash] = 0);
  2285. INI_WriteInt(File, "Admin",PlayerInfo[playerid][pAdmin] = 0);
  2286. INI_WriteInt(File, "Tester",PlayerInfo[playerid][pTester] = 0);
  2287. INI_WriteInt(File, "Vip", PlayerInfo[playerid][pVip] = 0);
  2288. INI_WriteInt(File, "Spawn", PlayerInfo[playerid][pSpawn] = 1);
  2289. INI_WriteInt(File, "Model", PlayerInfo[playerid][pModel] = 23);
  2290. INI_WriteInt(File, "Locked", PlayerInfo[playerid][pLocked] = 0);
  2291. INI_WriteInt(File, "FirstJoined", PlayerInfo[playerid][pFirstJoined] = 0);
  2292. INI_WriteInt(File, "Continent", PlayerInfo[playerid][pPlace] = 0);
  2293. INI_WriteInt(File, "Sex", PlayerInfo[playerid][pSex] = 0);
  2294. INI_WriteInt(File, "Selected", PlayerInfo[playerid][pSelected] = 1);
  2295. INI_WriteInt(File, "Age", PlayerInfo[playerid][pAge] = 0);
  2296. INI_WriteInt(File, "Origin", PlayerInfo[playerid][pOrigin] = 0);
  2297. INI_WriteInt(File, "Respect", PlayerInfo[playerid][pExp] = 0);
  2298. INI_WriteInt(File, "Warns", PlayerInfo[playerid][pWarns] = 0);
  2299. INI_WriteInt(File, "Muted", PlayerInfo[playerid][pMuted] = 0);
  2300. INI_WriteInt(File, "MuteTime", PlayerInfo[playerid][pMuteTime] = 0);
  2301. new rp = 100000 + random(899999);
  2302. INI_WriteInt(File, "Ph", PlayerInfo[playerid][pNumber] = rp);
  2303. INI_WriteInt(File, "DriveLic",PlayerInfo[playerid][pDriveLic] = 0);
  2304. INI_Close(File);
  2305. SpawnPlayer(playerid);
  2306. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  2307. }
  2308. }
  2309. if(dialogid == 2)
  2310. {
  2311. if(!response ) return Kick (playerid);
  2312. if(response)
  2313. {
  2314. if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
  2315. {
  2316. INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
  2317. SpawnPlayer(playerid);
  2318. gPlayerLogged[playerid] = 1;
  2319. GivePlayerCash(playerid, PlayerInfo[playerid][pCash]);
  2320. }
  2321. else
  2322. {
  2323. ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
  2324. gPlayerLogTries[playerid] += 1;
  2325. if(gPlayerLogTries[playerid] == 3)
  2326. {
  2327. Kick(playerid);
  2328. }
  2329. }
  2330. }
  2331. }
  2332. if(dialogid == 155)
  2333. {
  2334. if(response)
  2335. {
  2336. if (listitem == 0)
  2337. {
  2338. PlayerInfo[playerid][pSex] = 1;
  2339. SendClientMessage(playerid, COLOR_YELLOW2,"So you are Male");
  2340. ShowPlayerDialog(playerid,156,DIALOG_STYLE_INPUT,"Age","How old are you?:((This information is IC.))","Next","Leave Game");
  2341. }
  2342. else if (listitem == 1)
  2343. {
  2344. PlayerInfo[playerid][pSex] = 2;
  2345. SendClientMessage(playerid, COLOR_YELLOW2,"So you are Female");
  2346. ShowPlayerDialog(playerid,156,DIALOG_STYLE_INPUT,"Age","How old are you?:((This information is IC.))","Next","Leave Game");
  2347. }
  2348. }
  2349. else
  2350. {
  2351. Kick(playerid);
  2352. }
  2353. }
  2354. if(dialogid == 156)
  2355. {
  2356. if(response)
  2357. {
  2358. PlayerInfo[playerid][pAge] = strval(inputtext);
  2359. new string[64];
  2360. format(string, sizeof(string),"So you are %s years old", inputtext);
  2361. SendClientMessage(playerid, COLOR_YELLOW2, string);
  2362. new sexthings[] = " Europe \n America \n Russia";
  2363. if(strval(inputtext) <= 15)
  2364. {
  2365. SendClientMessage(playerid, COLOR_WHITE, "SERVER: This is a 16+ Only Server, Grow up and Come Back.");
  2366. Kick(playerid);
  2367. return 1;
  2368.  
  2369.  
  2370. }
  2371. if(strval(inputtext) >= 60)
  2372. {
  2373. SendClientMessage(playerid, COLOR_WHITE, "SERVER: Incorrect Age, You need to enter a Real Age.");
  2374. ShowPlayerDialog(playerid,156,DIALOG_STYLE_INPUT,"Age","How old are you?:((This information is IC.))","Next","Leave Game");
  2375. return 1;
  2376.  
  2377.  
  2378. }
  2379. ShowPlayerDialog(playerid,157,DIALOG_STYLE_LIST,"Where are you from?:((This information is IC.))",sexthings,"Select","Leave Game");
  2380. }
  2381. else
  2382. {
  2383. Kick(playerid);
  2384. }
  2385. }
  2386. if(dialogid == 157)
  2387. {
  2388. if(response)
  2389. {
  2390. if (listitem == 0)
  2391. {
  2392. PlayerInfo[playerid][pPlace] = 1;
  2393. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from the Europe.");
  2394. gPlayerRegStep[playerid] = 0;
  2395. PlayerInfo[playerid][pSelected] = 1;
  2396. }
  2397. else if (listitem == 1)
  2398. {
  2399. PlayerInfo[playerid][pPlace] = 2;
  2400. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from United States.");
  2401. gPlayerRegStep[playerid] = 0;
  2402. PlayerInfo[playerid][pSelected] = 1;
  2403. }
  2404. else if (listitem == 2)
  2405. {
  2406. PlayerInfo[playerid][pPlace] = 3;
  2407. SendClientMessage(playerid, COLOR_YELLOW2, "So you are from Russia.");
  2408. gPlayerRegStep[playerid] = 0;
  2409. PlayerInfo[playerid][pSelected] = 1;
  2410. }
  2411. gPlayerLogged[playerid] = 1;
  2412. new packthings[] = " Package 1 \n Package 2";
  2413. ShowPlayerDialog(playerid,158,DIALOG_STYLE_LIST,"Please select a package that you want to start with",packthings,"Select","Leave Game");
  2414. }
  2415. else
  2416. {
  2417. Kick(playerid);
  2418. }
  2419. }
  2420. if(dialogid == 158)
  2421. {
  2422. if(response)
  2423. {
  2424. if (listitem == 0)
  2425. {
  2426. new DialogString[1024];
  2427. format(DialogString, sizeof DialogString, "Level 2 \n 4 Respect Points \n 1000$");
  2428. ShowPlayerDialog(playerid,159,DIALOG_STYLE_MSGBOX,"Package 1", DialogString,"Accept","Back");
  2429. }
  2430. else if (listitem == 1)
  2431. {
  2432. new DialogString[1024];
  2433. format(DialogString, sizeof DialogString, "Level 1 \n 4000$");
  2434. ShowPlayerDialog(playerid,160,DIALOG_STYLE_MSGBOX,"Package 1", DialogString,"Accept","Back");
  2435. }
  2436. }
  2437. else
  2438. {
  2439. Kick(playerid);
  2440. }
  2441. }
  2442. if(dialogid == 159)
  2443. {
  2444. if(response)
  2445. {
  2446. new playerexp = PlayerInfo[playerid][pExp];
  2447. PlayerInfo[playerid][pExp] = playerexp + 4;
  2448. new playerlvl = PlayerInfo[playerid][pLevel];
  2449. PlayerInfo[playerid][pLevel] = playerlvl + 1;
  2450. GivePlayerCash(playerid, 1000);
  2451. TogglePlayerControllable(playerid, 1);
  2452. SendClientMessage(playerid, COLOR_YELLOW2,"That's all, if you need help you can /helpme, have fun!");
  2453. SendClientMessage(playerid, COLOR_LIGHTBLUE,"A taxi has bringed you to the DMV so you can take your Drivers License");
  2454. SetPlayerPos(playerid, 1424.1869,-1696.1482,13.5469);
  2455. }
  2456. else
  2457. {
  2458. new packthings[] = "Package 1 \n Package 2";
  2459. ShowPlayerDialog(playerid,158,DIALOG_STYLE_LIST,"Please select a package that you want to start with",packthings,"Select","Leave Game");
  2460. }
  2461. }
  2462. if(dialogid == 160)
  2463. {
  2464. if(response)
  2465. {
  2466. GivePlayerCash(playerid, 4000);
  2467. TogglePlayerControllable(playerid, 1);
  2468. SendClientMessage(playerid, COLOR_YELLOW2,"That's all, if you need help you can /helpme, have fun!");
  2469. SendClientMessage(playerid, COLOR_LIGHTBLUE,"A taxi has bringed you to the DMV so you can take your Drivers License");
  2470. SetPlayerPos(playerid, 1424.1869,-1696.1482,13.5469);
  2471. }
  2472. else
  2473. {
  2474. new packthings[] = "Package 1 \n Package 2";
  2475. ShowPlayerDialog(playerid,158,DIALOG_STYLE_LIST,"Please select a package that you want to start with",packthings,"Select","Leave Game");
  2476. }
  2477. }
  2478. //==========================DEALERSHIP==========================================
  2479. if(dialogid == DIALOG_ERROR)
  2480. {
  2481. ShowDialog(playerid, GetPVarInt(playerid, "DialogReturn"));
  2482. return 1;
  2483. }
  2484. SetPVarInt(playerid, "DialogReturn", dialogid);
  2485. if(dialogid == DIALOG_VEHICLE)
  2486. {
  2487. if(response)
  2488. {
  2489. switch(listitem)
  2490. {
  2491. case 0:
  2492. {
  2493. new vehicleid = GetPlayerVehicleID(playerid);
  2494. new engine, lights, alarm, doors, bonnet, boot, objective;
  2495. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  2496. if(boot == 1) boot = 0; else boot = 1;
  2497. SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  2498. }
  2499. case 1:
  2500. {
  2501. new vehicleid = GetPlayerVehicleID(playerid);
  2502. new engine, lights, alarm, doors, bonnet, boot, objective;
  2503. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  2504. if(engine == 0 && Fuel[vehicleid] <= 0)
  2505. {
  2506. ShowErrorDialog(playerid, "This vehicle is out of fuel!");
  2507. return 1;
  2508. }
  2509. if(engine == 1) { engine = 0; lights = 0; }
  2510. else { engine = 1; lights = 1; }
  2511. SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  2512. }
  2513. case 2:
  2514. {
  2515. new id = GetPVarInt(playerid, "DialogValue1");
  2516. if(GetPlayerVehicleAccess(playerid, id) != 1)
  2517. {
  2518. ShowErrorDialog(playerid, "You are not the owner of this vehicle!");
  2519. return 1;
  2520. }
  2521. new msg[128];
  2522. VehicleCreated[id] = 0;
  2523. new money = VehicleValue[id]/2;
  2524. GivePlayerCash(playerid, money);
  2525. format(msg, sizeof(msg), "You have sold your vehicle for $%d", money);
  2526. SendClientMessage(playerid, COLOR_WHITE, msg);
  2527. RemovePlayerFromVehicle(playerid);
  2528. DestroyVehicle(VehicleID[id]);
  2529. SaveVehicle(id);
  2530. }
  2531. case 3:
  2532. {
  2533. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  2534. if(GetPlayerVehicleAccess(playerid, vehicleid) != 1 && GetPlayerVehicleAccess(playerid, vehicleid) != 3)
  2535. {
  2536. ShowErrorDialog(playerid, "You are not the owner of this vehicle!");
  2537. return 1;
  2538. }
  2539. GetVehiclePos(VehicleID[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1], VehiclePos[vehicleid][2]);
  2540. GetVehicleZAngle(VehicleID[vehicleid], VehiclePos[vehicleid][3]);
  2541. SendClientMessage(playerid, COLOR_WHITE, "You have parked this vehicle here");
  2542. UpdateVehicle(vehicleid, 1);
  2543. PutPlayerInVehicle(playerid, VehicleID[vehicleid], 0);
  2544. SaveVehicle(vehicleid);
  2545. }
  2546. case 4:
  2547. {
  2548. ShowDialog(playerid, DIALOG_VEHICLE_PLATE);
  2549. }
  2550. }
  2551. }
  2552. return 1;
  2553. }
  2554. if(dialogid == DIALOG_VEHICLE_BUY)
  2555. {
  2556. if(response)
  2557. {
  2558. if(GetPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES)
  2559. {
  2560. ShowErrorDialog(playerid, "You can't buy any more vehicles! Max: " #MAX_PLAYER_VEHICLES );
  2561. return 1;
  2562. }
  2563. new id = GetPVarInt(playerid, "DialogValue1");
  2564. if(GetPlayerMoney(playerid) < VehicleValue[id])
  2565. {
  2566. ShowErrorDialog(playerid, "You don't have enough money to buy this vehicle!");
  2567. return 1;
  2568. }
  2569. new freeid;
  2570. for(new i=1; i < MAX_DVEHICLES; i++)
  2571. {
  2572. if(!VehicleCreated[i])
  2573. {
  2574. freeid = i; break;
  2575. }
  2576. }
  2577. if(!freeid)
  2578. {
  2579. ShowErrorDialog(playerid, "Vehicle dealership is out of stock!");
  2580. return 1;
  2581. }
  2582. GivePlayerCash(playerid, -VehicleValue[id]);
  2583. new dealerid = strval(VehicleOwner[id]);
  2584. VehicleCreated[freeid] = VEHICLE_PLAYER;
  2585. VehicleModel[freeid] = VehicleModel[id];
  2586. VehiclePos[freeid][0] = DealershipPos[dealerid][0];
  2587. VehiclePos[freeid][1] = DealershipPos[dealerid][1];
  2588. VehiclePos[freeid][2] = DealershipPos[dealerid][2];
  2589. VehicleColor[freeid][0] = VehicleColor[id][0];
  2590. VehicleColor[freeid][1] = VehicleColor[id][0];
  2591. VehicleInterior[freeid] = VehicleInterior[id];
  2592. VehicleWorld[freeid] = VehicleWorld[id];
  2593. VehicleValue[freeid] = VehicleValue[id];
  2594. strcpy(VehicleOwner[freeid], sizeof(VehicleOwner[]), PlayerName(playerid));
  2595. VehicleNumberPlate[freeid] = DEFAULT_NUMBER_PLATE;
  2596. for(new d=0; d < sizeof(VehicleTrunk[]); d++)
  2597. {
  2598. VehicleTrunk[freeid][d][0] = 0;
  2599. VehicleTrunk[freeid][d][1] = 0;
  2600. }
  2601. for(new d=0; d < sizeof(VehicleMods[]); d++)
  2602. {
  2603. VehicleMods[freeid][d] = 0;
  2604. }
  2605. VehiclePaintjob[freeid] = 255;
  2606. UpdateVehicle(freeid, 0);
  2607. SaveVehicle(freeid);
  2608. new msg[128];
  2609. format(msg, sizeof(msg), "You have bought this vehicle for $%d", VehicleValue[id]);
  2610. SendClientMessage(playerid, COLOR_WHITE, msg);
  2611. RemovePlayerFromVehicle(playerid);
  2612. SetTimer("Unfreeze", 1000, 0);
  2613. }
  2614. else
  2615. {
  2616. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  2617. if(GetPlayerVehicleAccess(playerid, vehicleid) != 3)
  2618. {
  2619. RemovePlayerFromVehicle(playerid);
  2620. }
  2621. RemovePlayerFromVehicle(playerid);
  2622. }
  2623. return 1;
  2624. }
  2625. if(dialogid == DIALOG_VEHICLE_SELL)
  2626. {
  2627. if(response)
  2628. {
  2629. if(GetPlayerVehicles(playerid) >= MAX_PLAYER_VEHICLES)
  2630. {
  2631. ShowErrorDialog(playerid, "You can't buy any more vehicles! Max: " #MAX_PLAYER_VEHICLES );
  2632. return 1;
  2633. }
  2634. new targetid = GetPVarInt(playerid, "DialogValue1");
  2635. new vehicleid = GetPVarInt(playerid, "DialogValue2");
  2636. new price = GetPVarInt(playerid, "DialogValue3");
  2637. if(GetPlayerMoney(playerid) < price)
  2638. {
  2639. ShowErrorDialog(playerid, "You don't have enough money to buy this vehicle!");
  2640. return 1;
  2641. }
  2642. new msg[128];
  2643. strcpy(VehicleOwner[vehicleid], sizeof(VehicleOwner[]), PlayerName(playerid));
  2644. GivePlayerCash(playerid, -price);
  2645. GivePlayerCash(targetid, price);
  2646. SaveVehicle(vehicleid);
  2647. format(msg, sizeof(msg), "You have bought this vehicle for $%d", price);
  2648. SendClientMessage(playerid, COLOR_WHITE, msg);
  2649. format(msg, sizeof(msg), "%s (%d) has accepted your offer and bought the vehicle", PlayerName(playerid), playerid);
  2650. SendClientMessage(targetid, COLOR_WHITE, msg);
  2651. }
  2652. else
  2653. {
  2654. new targetid = GetPVarInt(playerid, "DialogValue1");
  2655. new msg[128];
  2656. format(msg, sizeof(msg), "%s (%d) refused your offer", PlayerName(playerid), playerid);
  2657. SendClientMessage(targetid, COLOR_WHITE, msg);
  2658. }
  2659. return 1;
  2660. }
  2661. if(dialogid == DIALOG_FINDVEHICLE)
  2662. {
  2663. if(response)
  2664. {
  2665. new id;
  2666. sscanf(inputtext[4], "d", id);
  2667. if(IsValidVehicle(id))
  2668. {
  2669. TrackCar[playerid] = VehicleID[id];
  2670. SendClientMessage(playerid, COLOR_WHITE, "You vehicle's location is shown on your radar");
  2671. }
  2672. }
  2673. return 1;
  2674. }
  2675. if(dialogid == DIALOG_TRUNK)
  2676. {
  2677. if(response)
  2678. {
  2679. SetPVarInt(playerid, "DialogValue2", listitem);
  2680. ShowDialog(playerid, DIALOG_TRUNK_ACTION);
  2681. }
  2682. else
  2683. {
  2684. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  2685. new engine, lights, alarm, doors, bonnet, boot, objective;
  2686. GetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, boot, objective);
  2687. SetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, 0, objective);
  2688. }
  2689. return 1;
  2690. }
  2691. if(dialogid == DIALOG_TRUNK_ACTION)
  2692. {
  2693. if(response)
  2694. {
  2695. new vehicleid = GetPVarInt(playerid, "DialogValue1");
  2696. new slot = GetPVarInt(playerid, "DialogValue2");
  2697. switch(listitem)
  2698. {
  2699. case 0:
  2700. {
  2701. new weaponid = GetPlayerWeapon(playerid);
  2702. if(weaponid == 0)
  2703. {
  2704. ShowPlayerDialog(playerid, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ERROR", "You don't have a weapon in your hands!", "OK", "");
  2705. return 1;
  2706. }
  2707. VehicleTrunk[vehicleid][slot][0] = weaponid;
  2708. if(IsMeleeWeapon(weaponid)) VehicleTrunk[vehicleid][slot][1] = 1;
  2709. else VehicleTrunk[vehicleid][slot][1] = GetPlayerAmmo(playerid);
  2710. RemovePlayerWeapon(playerid, weaponid);
  2711. SaveVehicle(vehicleid);
  2712. }
  2713. case 1:
  2714. {
  2715. if(VehicleTrunk[vehicleid][slot][1] <= 0)
  2716. {
  2717. ShowPlayerDialog(playerid, DIALOG_ERROR, DIALOG_STYLE_MSGBOX, "ERROR", "This slot is empty!", "OK", "");
  2718. return 1;
  2719. }
  2720. GivePlayerWeapon(playerid, VehicleTrunk[vehicleid][slot][0], VehicleTrunk[vehicleid][slot][1]);
  2721. VehicleTrunk[vehicleid][slot][0] = 0;
  2722. VehicleTrunk[vehicleid][slot][1] = 0;
  2723. SaveVehicle(vehicleid);
  2724. }
  2725. }
  2726. }
  2727. ShowDialog(playerid, DIALOG_TRUNK);
  2728. return 1;
  2729. }
  2730. if(dialogid == DIALOG_VEHICLE_PLATE)
  2731. {
  2732. if(response)
  2733. {
  2734. if(strlen(inputtext) < 1 || strlen(inputtext) >= sizeof(VehicleNumberPlate[]))
  2735. {
  2736. ShowErrorDialog(playerid, "Invalid length!");
  2737. return 1;
  2738. }
  2739. new id = GetPVarInt(playerid, "DialogValue1");
  2740. new vehicleid = VehicleID[id];
  2741. strcpy(VehicleNumberPlate[id], sizeof(VehicleNumberPlate[]), inputtext);
  2742. SaveVehicle(id);
  2743. SetVehicleNumberPlate(vehicleid, inputtext);
  2744. SetVehicleToRespawn(vehicleid);
  2745. new msg[128];
  2746. format(msg, sizeof(msg), "You have changed vehicle number plate to %s", inputtext);
  2747. SendClientMessage(playerid, COLOR_WHITE, msg);
  2748. }
  2749. else ShowDialog(playerid, DIALOG_VEHICLE);
  2750. return 1;
  2751. }
  2752. if(dialogid == DIALOG_FUEL)
  2753. {
  2754. if(response)
  2755. {
  2756. switch(listitem)
  2757. {
  2758. case 0:
  2759. {
  2760. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  2761. {
  2762. ShowErrorDialog(playerid, "You are not driving a vehicle!");
  2763. return 1;
  2764. }
  2765. new vehicleid = GetPlayerVehicleID(playerid);
  2766. if(IsBicycle(vehicleid))
  2767. {
  2768. ShowErrorDialog(playerid, "Your vehicle doesn't have a fuel tank!");
  2769. return 1;
  2770. }
  2771. if(Fuel[vehicleid] >= 100.0)
  2772. {
  2773. ShowErrorDialog(playerid, "Your vehicle fuel tank is full!");
  2774. return 1;
  2775. }
  2776. if(GetPlayerMoney(playerid) < FUEL_PRICE)
  2777. {
  2778. ShowErrorDialog(playerid, "You don't have enough money!");
  2779. return 1;
  2780. }
  2781. RefuelTime[playerid] = 5;
  2782. SetPVarFloat(playerid, "Fuel", Fuel[vehicleid]);
  2783. GameTextForPlayer(playerid, "~w~refueling...", 2000, 3);
  2784. }
  2785. case 1:
  2786. {
  2787. if(GetPVarInt(playerid, "GasCan"))
  2788. {
  2789. ShowErrorDialog(playerid, "You already have a gas can!");
  2790. return 1;
  2791. }
  2792. if(GetPlayerMoney(playerid) < GAS_CAN_PRICE)
  2793. {
  2794. ShowErrorDialog(playerid, "You don't have enough money!");
  2795. return 1;
  2796. }
  2797. GivePlayerCash(playerid, -GAS_CAN_PRICE);
  2798. SetPVarInt(playerid, "GasCan", 1);
  2799. SendClientMessage(playerid, COLOR_WHITE, "You have bought a gas can for $" #GAS_CAN_PRICE );
  2800. }
  2801. }
  2802. }
  2803. return 1;
  2804. }
  2805. if(dialogid == DIALOG_EDITVEHICLE)
  2806. {
  2807. if(response)
  2808. {
  2809. new id = GetPVarInt(playerid, "DialogValue1");
  2810. new nr, params[128];
  2811. sscanf(inputtext, "ds", nr, params);
  2812. switch(nr)
  2813. {
  2814. case 1:
  2815. {
  2816. new value = strval(params);
  2817. if(value < 0) value = 0;
  2818. VehicleValue[id] = value;
  2819. UpdateVehicleLabel(id, 1);
  2820. SaveVehicle(id);
  2821. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  2822. }
  2823. case 2:
  2824. {
  2825. new value;
  2826. if(IsNumeric(params)) value = strval(params);
  2827. else value = GetVehicleModelIDFromName(params);
  2828. if(value < 400 || value > 611)
  2829. {
  2830. ShowErrorDialog(playerid, "Invalid vehicle model!");
  2831. return 1;
  2832. }
  2833. VehicleModel[id] = value;
  2834. for(new i=0; i < sizeof(VehicleMods[]); i++)
  2835. {
  2836. VehicleMods[id][i] = 0;
  2837. }
  2838. VehiclePaintjob[id] = 255;
  2839. UpdateVehicle(id, 1);
  2840. SaveVehicle(id);
  2841. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  2842. }
  2843. case 3:
  2844. {
  2845. new color1, color2;
  2846. sscanf(params, "dd", color1, color2);
  2847. VehicleColor[id][0] = color1;
  2848. VehicleColor[id][1] = color2;
  2849. SaveVehicle(id);
  2850. ChangeVehicleColor(VehicleID[id], color1, color2);
  2851. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  2852. }
  2853. case 4:
  2854. {
  2855. if(strlen(params) < 1 || strlen(params) > 8)
  2856. {
  2857. ShowErrorDialog(playerid, "Invalid length!");
  2858. return 1;
  2859. }
  2860. strcpy(VehicleNumberPlate[id], sizeof(VehicleNumberPlate[]), params);
  2861. SaveVehicle(id);
  2862. SetVehicleNumberPlate(VehicleID[id], params);
  2863. SetVehicleToRespawn(VehicleID[id]);
  2864. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  2865. }
  2866. case 5:
  2867. {
  2868. DestroyVehicle(VehicleID[id]);
  2869. if(VehicleCreated[id] == VEHICLE_DEALERSHIP)
  2870. {
  2871. Delete3DTextLabel(VehicleLabel[id]);
  2872. }
  2873. VehicleCreated[id] = 0;
  2874. SaveVehicle(id);
  2875. new msg[128];
  2876. format(msg, sizeof(msg), "You have deleted vehicle id %d", id);
  2877. SendClientMessage(playerid, COLOR_WHITE, msg);
  2878. }
  2879. case 6:
  2880. {
  2881. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
  2882. {
  2883. ShowErrorDialog(playerid, "You are not driving the vehicle!");
  2884. return 1;
  2885. }
  2886. GetVehiclePos(VehicleID[id], VehiclePos[id][0], VehiclePos[id][1], VehiclePos[id][2]);
  2887. GetVehicleZAngle(VehicleID[id], VehiclePos[id][3]);
  2888. SendClientMessage(playerid, COLOR_WHITE, "You have parked this vehicle here");
  2889. UpdateVehicle(id, 1);
  2890. PutPlayerInVehicle(playerid, VehicleID[id], 0);
  2891. SaveVehicle(id);
  2892. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  2893. }
  2894. case 7:
  2895. {
  2896. new Float:x, Float:y, Float:z;
  2897. GetVehiclePos(VehicleID[id], x, y, z);
  2898. SetPlayerPos(playerid, x, y, z+1);
  2899. new msg[128];
  2900. format(msg, sizeof(msg), "You have teleported to vehicle id %d", id);
  2901. SendClientMessage(playerid, COLOR_WHITE, msg);
  2902. }
  2903. }
  2904. }
  2905. }
  2906. return 1;
  2907. }
  2908. public ClearChatboxToAll(playerid, lines)
  2909. {
  2910. if (IsPlayerConnected(playerid))
  2911. {
  2912. for(new i=0; i<lines; i++)
  2913. {
  2914. SendClientMessageToAll(COLOR_GREY, " ");
  2915. }
  2916. }
  2917. return 1;
  2918. }
  2919. public OOCOff(color,const string[])
  2920. {
  2921. for(new i = 0; i < MAX_PLAYERS; i++)
  2922. {
  2923. if(IsPlayerConnected(i))
  2924. {
  2925. if(!gOoc[i])
  2926. {
  2927. SendClientMessage(i, color, string);
  2928. }
  2929. }
  2930. }
  2931. }
  2932. public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
  2933. {
  2934. if(IsPlayerConnected(playerid))
  2935. {
  2936. new Float:posx, Float:posy, Float:posz;
  2937. new Float:oldposx, Float:oldposy, Float:oldposz;
  2938. new Float:tempposx, Float:tempposy, Float:tempposz;
  2939. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  2940. //radi = 2.0; //Trigger Radius
  2941. for(new i = 0; i < MAX_PLAYERS; i++)
  2942. {
  2943. if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
  2944. {
  2945. if(!BigEar[i])
  2946. {
  2947. GetPlayerPos(i, posx, posy, posz);
  2948. tempposx = (oldposx -posx);
  2949. tempposy = (oldposy -posy);
  2950. tempposz = (oldposz -posz);
  2951. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  2952. if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
  2953. {
  2954. SendClientMessage(i, col1, string);
  2955. }
  2956. else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
  2957. {
  2958. SendClientMessage(i, col2, string);
  2959. }
  2960. else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
  2961. {
  2962. SendClientMessage(i, col3, string);
  2963. }
  2964. else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
  2965. {
  2966. SendClientMessage(i, col4, string);
  2967. }
  2968. else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  2969. {
  2970. SendClientMessage(i, col5, string);
  2971. }
  2972. }
  2973. else
  2974. {
  2975. SendClientMessage(i, col1, string);
  2976. }
  2977. }
  2978. }
  2979. }//not connected
  2980. return 1;
  2981. }
  2982. public ClearChatboxToAll2(playerid, lines)//newbie chat
  2983. {
  2984. for(new k=0; k<MAX_PLAYERS; k++)
  2985. {
  2986. if (IsPlayerConnected(k))
  2987. {
  2988. for(new i=0; i<lines; i++)
  2989. {
  2990. if (PlayerInfo[k][pLevel] < 4)
  2991. {
  2992. SendClientMessage(k, COLOR_GREY, " ");
  2993. }
  2994. }
  2995. }
  2996. }
  2997. return 1;
  2998. }
  2999. public split(const strsrc[], strdest[][], delimiter)
  3000. {
  3001. new i, li;
  3002. new aNum;
  3003. new len;
  3004. while(i <= strlen(strsrc)){
  3005. if(strsrc[i]==delimiter || i==strlen(strsrc)){
  3006. len = strmid(strdest[aNum], strsrc, li, i, 128);
  3007. strdest[aNum][len] = 0;
  3008. li = i+1;
  3009. aNum++;
  3010. }
  3011. i++;
  3012. }
  3013. return 1;
  3014. }
  3015. public SendAdminMessage(color, string[])
  3016. {
  3017. for(new i = 0; i < MAX_PLAYERS; i++)
  3018. {
  3019. if(IsPlayerConnected(i))
  3020. {
  3021. if(PlayerInfo[i][pAdmin] >= 1)
  3022. {
  3023. SendClientMessage(i, color, string);
  3024. }
  3025. }
  3026. }
  3027. }
  3028. public SendTesterMessage(color, string[])
  3029. {
  3030. for(new i = 0; i < MAX_PLAYERS; i++)
  3031. {
  3032. if(IsPlayerConnected(i))
  3033. {
  3034. if(PlayerInfo[i][pTester] >= 1)
  3035. {
  3036. SendClientMessage(i, color, string);
  3037. }
  3038. }
  3039. }
  3040. }
  3041. public ProxDetectorS(Float:radi, playerid, targetid)
  3042. {
  3043. if(IsPlayerConnected(playerid)&&IsPlayerConnected(targetid))
  3044. {
  3045. new Float:posx, Float:posy, Float:posz;
  3046. new Float:oldposx, Float:oldposy, Float:oldposz;
  3047. new Float:tempposx, Float:tempposy, Float:tempposz;
  3048. GetPlayerPos(playerid, oldposx, oldposy, oldposz);
  3049. //radi = 2.0; //Trigger Radius
  3050. GetPlayerPos(targetid, posx, posy, posz);
  3051. tempposx = (oldposx -posx);
  3052. tempposy = (oldposy -posy);
  3053. tempposz = (oldposz -posz);
  3054. //printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
  3055. if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
  3056. {
  3057. return 1;
  3058. }
  3059. }
  3060. return 0;
  3061. }
  3062. public OnPlayerText(playerid, text[])
  3063. {
  3064. if(PlayerInfo[playerid][pMuted] == 1)
  3065. {
  3066. SendClientMessage(playerid, COLOR_RED, "You cannot speak, you have been silenced");
  3067. return 0;
  3068. }
  3069. if(Mobile[playerid] != 255)
  3070. {
  3071. new string[128], sendername[MAX_PLAYER_NAME];
  3072. GetPlayerName(playerid, sendername, sizeof(sendername));
  3073. sendername[strfind(sendername,"_")] = ' ';
  3074. format(string, sizeof(string), "%s Says (cellphone): %s", sendername, text);
  3075. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  3076. }
  3077. if (realchat)
  3078. {
  3079. new sendername[MAX_PLAYER_NAME], string[128];
  3080. GetPlayerName(playerid, sendername, sizeof(sendername));
  3081. sendername[strfind(sendername,"_")] = ' ';
  3082. format(string, sizeof(string), "%s Says: %s", sendername, text);
  3083. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  3084. new lengthtime = strlen(text);
  3085. new time = lengthtime*50;
  3086. ApplyAnimation(playerid,"PED","IDLE_CHAT",4.0,0,0,0,0,time);
  3087. return 0;
  3088. }
  3089. return 1;
  3090. }
  3091. public newbietimer()
  3092. {
  3093. for(new i = 0; i < MAX_PLAYERS; i++)
  3094. {
  3095. ntimer[i] -= 10;
  3096. }
  3097. }
  3098. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  3099. {
  3100. if(!ispassenger)
  3101. {
  3102. new id = GetVehicleID(vehicleid);
  3103. if(IsValidVehicle(id) && VehicleCreated[id] == VEHICLE_PLAYER)
  3104. {
  3105. new msg[128];
  3106. format(msg, sizeof(msg), "This vehicle belongs to %s", VehicleOwner[id]);
  3107. SendClientMessage(playerid, COLOR_GREY, msg);
  3108. }
  3109. }
  3110. return 1;
  3111. }
  3112. public RACtime(playerid)
  3113. {
  3114. for(new player=0; player<MAX_PLAYERS; player++)
  3115. {
  3116. if(!IsVehicleOccupied(player)) SetVehicleToRespawn(player);
  3117. }
  3118. for(new car = 1; car <= 1000; car++)
  3119. {
  3120. if(!IsVehicleOccupied(car)) SetVehicleToRespawn(car);
  3121. }
  3122. return 1;
  3123. }
  3124. public ABroadCast(color,const string[],level)
  3125. {
  3126. for(new i = 0; i < MAX_PLAYERS; i++)
  3127. {
  3128. if(IsPlayerConnected(i))
  3129. {
  3130. if (PlayerInfo[i][pAdmin] >= level)
  3131. {
  3132. SendClientMessage(i, color, string);
  3133. }
  3134. }
  3135. }
  3136. return 1;
  3137. }
  3138. public TBroadCast(color,const string[],level)
  3139. {
  3140. for(new i = 0; i < MAX_PLAYERS; i++)
  3141. {
  3142. if(IsPlayerConnected(i))
  3143. {
  3144. if (PlayerInfo[i][pTester] >= level)
  3145. {
  3146. SendClientMessage(i, color, string);
  3147. }
  3148. }
  3149. }
  3150. return 1;
  3151. }
  3152.  
  3153. //================================[COMMANDS]====================================
  3154. CMD:veh(playerid, params[])
  3155. {
  3156. if(PlayerInfo[playerid][pAdmin] >= 4)
  3157. {
  3158. new veh,color1,color2;
  3159. if (!sscanf(params, "iii", veh, color1,color2))
  3160. {
  3161. new Float:x, Float:y, Float:z;
  3162. GetPlayerPos(playerid, x,y,z);
  3163. AddStaticVehicle(veh, x,y,z,0,color1, color2);
  3164. }
  3165. else SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /veh [carid] [Color 1] [Color 2]");
  3166. }
  3167. else SendClientMessage(playerid, 0xFFFFFFFF, "You do not have the rights to use that command!");
  3168. return 1;
  3169. }
  3170.  
  3171. CMD:stats(playerid, params[])
  3172. {
  3173. if(gPlayerLogged[playerid] == 1)
  3174. {
  3175. ShowStats(playerid, playerid);
  3176. }
  3177. else
  3178. {
  3179. SCM(playerid, COLOR_GREY,"You are not logged in!");
  3180. }
  3181. return 1;
  3182. }
  3183. CMD:th(playerid, params[])
  3184. {
  3185. new string[128];
  3186. if(!(PlayerInfo[playerid][pTester] == 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3187. if(PlayerInfo[playerid][pTester] == 1)
  3188. {
  3189. format(string, sizeof(string),"***Testers Commands:{C3C3C3} /goto /gethere /respawn /cc /cnc /mute /unmute /tc [text] (tester/admin chat) /tod /sendtols");
  3190. SendClientMessage(playerid, COLOR_GRAD1, string);
  3191. }
  3192. return 1;
  3193. }
  3194. CMD:ah(playerid, params[])
  3195. {
  3196. if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3197. new string[128];
  3198. if(PlayerInfo[playerid][pAdmin] >= 1)
  3199. {
  3200. format(string, sizeof(string),"***Admin Level 1:{C3C3C3} /goto /gethere /respawn /healall /kick /ban /cc /cnc /a [text] (admin chat)");
  3201. SendClientMessage(playerid, COLOR_GRAD1, string);
  3202. format(string, sizeof(string),"***Admin Level 1:{C3C3C3} /warn /aod /unban /unbanip /freeze /unfreeze /check /mute /unmute /acceptreport /markfalse");
  3203. SendClientMessage(playerid, COLOR_GRAD1, string);
  3204. }
  3205. if(PlayerInfo[playerid][pAdmin] >= 2)
  3206. {
  3207. format(string, sizeof(string),"***Admin Level 2:{C3C3C3} /gotols /gotolv /gotosf /sendtols");
  3208. SendClientMessage(playerid, COLOR_GRAD1, string);
  3209. }
  3210. if(PlayerInfo[playerid][pAdmin] >= 4)
  3211. {
  3212. format(string, sizeof(string),"***Admin Level 4:{C3C3C3} /veh /setskin /sethp /givegun");
  3213. SendClientMessage(playerid, COLOR_GRAD1, string);
  3214. }
  3215. if(PlayerInfo[playerid][pAdmin] >= 1337)
  3216. {
  3217. format(string, sizeof(string),"***Admin Level 1337:{C3C3C3} /rac /setlevel /givemoney");
  3218. SendClientMessage(playerid, COLOR_GRAD1, string);
  3219. }
  3220. if(PlayerInfo[playerid][pAdmin] >= 1338)
  3221. {
  3222. format(string, sizeof(string),"***Admin Level 1338:{C3C3C3} /maketester /makeadmin /changename /addv /editv /setfuel");
  3223. SendClientMessage(playerid, COLOR_GRAD1, string);
  3224. format(string, sizeof(string),"***Admin Level 1338:{C3C3C3} /adddealership /deletedealership /movedealership /gotodealership");
  3225. SendClientMessage(playerid, COLOR_GRAD1, string);
  3226. format(string, sizeof(string),"***Admin Level 1338:{C3C3C3} /addfuelstation /deletefuelstation /movefuelstation /gotofuelstation");
  3227. SendClientMessage(playerid, COLOR_GRAD1, string);
  3228. }
  3229. return 1;
  3230. }
  3231.  
  3232. CMD:help(playerid, params[])
  3233. {
  3234. if(PlayerInfo[playerid][pAdmin] >= 1)
  3235. {
  3236. SendClientMessage(playerid, COLOR_GRAD2,"***Admin: /ah");
  3237. }
  3238. if(PlayerInfo[playerid][pTester] >= 1)
  3239. {
  3240. SendClientMessage(playerid, COLOR_GRAD2,"***Tester: /th");
  3241. }
  3242. SendClientMessage(playerid, COLOR_GRAD1,"{FFAF00}*** ACCOUNT *** {C3C3C3}/rules /forum /stats /buylevel");
  3243. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** GENERAL *** {C3C3C3}/me /anims /do /time /helpme /report /(c)all /(h)angup /(p)ickup /number");
  3244. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** GENERAL *** {C3C3C3}/admins /testers /id /pay /newspaper /stopanim /takeexam");
  3245. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** CAR *** {C3C3C3}/v /tow /eject /ejectall /vlock /valarm /fuel /trunk");
  3246. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** CAR *** {C3C3C3}/clearmods /sellv /givecarkeys /trackcar /engine");
  3247. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** CHAT *** {C3C3C3}/b [local ooc chat] /s (shout) /low [low chat]");
  3248. SendClientMessage(playerid, COLOR_GRAD2,"{FFAF00}*** CHAT *** {C3C3C3}/n (newbie chat) /w (whisper) /pm (private message ooc)");
  3249. return 1;
  3250. }
  3251. CMD:setskin(playerid, params[])
  3252. {
  3253. new id, ammount, name[MAX_PLAYER_NAME], string[128];
  3254. if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3255. else if(sscanf(params,"ui", id, ammount)) return SCM(playerid, COLOR_GREY,"USAGE: /setskin [playerid/partofname] [skinmodel]");
  3256. else if(ammount > 299 || ammount < 1) return SCM(playerid, COLOR_GREY,"Wrong Skin ID! Available ID's: 1-299");
  3257. else if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3258. else
  3259. {
  3260. GetPlayerName(playerid, name, sizeof(name));
  3261. format(string, sizeof(string),"Your skin have been setted to %i by admin %s", ammount, name);
  3262. SendClientMessage(id, COLOR_GREEN, string);
  3263. PlayerInfo[id][pModel] = ammount;
  3264. SetPlayerSkin(id, PlayerInfo[id][pModel]);
  3265. }
  3266. return 1;
  3267. }
  3268. CMD:sendtols(playerid, params[])
  3269. {
  3270. new id, sendername[MAX_PLAYER_NAME], string[128];
  3271. if(PlayerInfo[playerid][pAdmin] < 2 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3272. else if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /sendtols [playerid/partofname]");
  3273. else if(GetPlayerState(id) == 2)
  3274. {
  3275. new tmpcar = GetPlayerVehicleID(id);
  3276. SetVehiclePos(tmpcar,1529.6,-1691.2,13.3);
  3277. }
  3278. else
  3279. {
  3280. SetPlayerPos(id, 1529.6,-1691.2,13.3);
  3281. }
  3282. GetPlayerName(playerid, sendername, sizeof(sendername));
  3283. sendername[strfind(sendername,"_")] = ' ';
  3284. format(string, sizeof(string),"You have been teleported to Los Santos by admin %s !", sendername);
  3285. SendClientMessage(id, COLOR_GRAD1, string);
  3286. SetPlayerInterior(id,0);
  3287. SetPlayerVirtualWorld(id, 0);
  3288. return 1;
  3289. }
  3290. CMD:setlevel(playerid, params[])
  3291. {
  3292. new id, level, sendername[MAX_PLAYER_NAME], string[128];
  3293. if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3294. else if(sscanf(params,"ui", id, level)) return SCM(playerid, COLOR_GREY,"USAGE: /setlevel [playerid/partofname] [level]");
  3295. else if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  3296. else
  3297. {
  3298. PlayerInfo[id][pLevel] = level;
  3299. GetPlayerName(playerid, sendername, sizeof(sendername));
  3300. sendername[strfind(sendername,"_")] = ' ';
  3301. format(string, sizeof(string),"Your level has been set to %i by admin %s", level, sendername);
  3302. SendClientMessage(id, COLOR_YELLOW, string);
  3303. }
  3304. return 1;
  3305. }
  3306. CMD:sethp(playerid, params[])
  3307. {
  3308. new id, hp, sendername[MAX_PLAYER_NAME], string[128];
  3309. if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3310. else if(sscanf(params,"ui", id, hp)) return SCM(playerid, COLOR_GREY,"USAGE: /sethp [playerid/partofname] [ammount]");
  3311. else if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  3312. else
  3313. {
  3314. SetPlayerHealth(id, hp);
  3315. GetPlayerName(playerid, sendername, sizeof(sendername));
  3316. sendername[strfind(sendername,"_")] = ' ';
  3317. format(string, sizeof(string),"Your health has been set to %i by admin %s", hp, sendername);
  3318. SendClientMessage(id, COLOR_YELLOW, string);
  3319. }
  3320. return 1;
  3321. }
  3322. CMD:givegun(playerid, params[])
  3323. {
  3324. new id, gun, ammo;
  3325. if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3326. else if(sscanf(params,"uii", id, gun, ammo)) return SCM(playerid, COLOR_GREY,"USAGE: /givegun [playerid/partofname] [gunid] [ammo]");
  3327. else if(gun > 47 || gun < 1) return SCM(playerid, COLOR_GREY,"GUN ID'S: 1-47");
  3328. else if(ammo > 999 || ammo < 1) return SCM(playerid, COLOR_GREY,"Ammo 1-999");
  3329. else
  3330. {
  3331. GivePlayerWeapon(id, gun, ammo);
  3332. }
  3333. return 1;
  3334. }
  3335. CMD:admins(playerid, params[])
  3336. {
  3337. if(IsPlayerConnected(playerid))
  3338. {
  3339. SendClientMessage(playerid, COLOR_GREY, " ");
  3340. SendClientMessage(playerid, COLOR_GREY, "-| Online Admins |-");
  3341. for(new i = 0; i < MAX_PLAYERS; i++)
  3342. {
  3343. if(IsPlayerConnected(i))
  3344. {
  3345. if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] < 1339)
  3346. {
  3347. new admtext[64], sendername[MAX_PLAYER_NAME], string[128];
  3348. if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
  3349. else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Admin Level 1337"; }
  3350. else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Admin Level 4"; }
  3351. else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Admin Level 3"; }
  3352. else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Admin Level 2"; }
  3353. else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Admin Level 1"; }
  3354. else { admtext = "Admin Level 1"; }
  3355. GetPlayerName(i, sendername, sizeof(sendername));
  3356. sendername[strfind(sendername,"_")] = ' ';
  3357. if(AdminDuty[i] == 0)
  3358. {
  3359. format(string, 128, "%s: %s (AdminDuty: No)", admtext, sendername);
  3360. SendClientMessage(playerid, random(0xFFFFFFFF), string);
  3361. }
  3362. else
  3363. {
  3364. format(string, 128, "%s: %s (AdminDuty: Yes)", admtext, sendername);
  3365. SendClientMessage(playerid, 0xFAAFBEFF, string);
  3366.  
  3367. }
  3368. }
  3369. }
  3370. }
  3371. }
  3372. return 1;
  3373. }
  3374. CMD:testers(playerid, params[])
  3375. {
  3376. if(IsPlayerConnected(playerid))
  3377. {
  3378. SendClientMessage(playerid, COLOR_WHITE, " ");
  3379. SendClientMessage(playerid, COLOR_WHITE, "-| Online Testers |-");
  3380. for(new i = 0; i < MAX_PLAYERS; i++)
  3381. {
  3382. if(IsPlayerConnected(i))
  3383. {
  3384. if(PlayerInfo[i][pTester] >= 1 && PlayerInfo[i][pTester] < 1339)
  3385. {
  3386. new admtext[64], sendername[MAX_PLAYER_NAME], string[128];
  3387. if(PlayerInfo[i][pTester] == 1) { admtext = "Tester"; }
  3388. else { admtext = "Tester"; }
  3389. GetPlayerName(i, sendername, sizeof(sendername));
  3390. sendername[strfind(sendername,"_")] = ' ';
  3391. if(TesterDuty[i] == 0)
  3392. {
  3393. format(string, 128, "%s: %s (TesterDuty: No)", admtext, sendername);
  3394. SendClientMessage(playerid, random(0xFFFFFFFF), string);
  3395. }
  3396. else
  3397. {
  3398. format(string, 128, "%s: %s (TesterDuty: Yes)", admtext, sendername);
  3399. SendClientMessage(playerid, COLOR_GREEN, string);
  3400.  
  3401. }
  3402. }
  3403. }
  3404. }
  3405. }
  3406. return 1;
  3407. }
  3408.  
  3409. CMD:gotols(playerid, params[])
  3410. {
  3411. if(!(PlayerInfo[playerid][pAdmin] >= 2)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3412. else if(GetPlayerState(playerid) == 2)
  3413. {
  3414. new tmpcar = GetPlayerVehicleID(playerid);
  3415. SetVehiclePos(tmpcar,1529.6,-1691.2,13.3);
  3416. }
  3417. else
  3418. {
  3419. SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
  3420. }
  3421. SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported !");
  3422. SetPlayerInterior(playerid,0);
  3423. SetPlayerVirtualWorld(playerid, 0);
  3424. return 1;
  3425. }
  3426. CMD:gotolv(playerid, params[])
  3427. {
  3428. if(!(PlayerInfo[playerid][pAdmin] >= 2)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3429. else if(GetPlayerState(playerid) == 2)
  3430. {
  3431. new tmpcar = GetPlayerVehicleID(playerid);
  3432. SetVehiclePos(tmpcar,1699.2, 1435.1, 10.7);
  3433. }
  3434. else
  3435. {
  3436. SetPlayerPos(playerid, 1699.2, 1435.1, 10.7);
  3437. }
  3438. SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported !");
  3439. SetPlayerInterior(playerid,0);
  3440. SetPlayerVirtualWorld(playerid, 0);
  3441. return 1;
  3442. }
  3443. CMD:gotosf(playerid, params[])
  3444. {
  3445. if(!(PlayerInfo[playerid][pAdmin] >= 2)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3446. else if(GetPlayerState(playerid) == 2)
  3447. {
  3448. new tmpcar = GetPlayerVehicleID(playerid);
  3449. SetVehiclePos(tmpcar,-1417.0,-295.8,14.1);
  3450. }
  3451. else
  3452. {
  3453. SetPlayerPos(playerid, -1417.0,-295.8,14.1);
  3454. }
  3455. SendClientMessage(playerid, COLOR_GRAD1, " You have been teleported !");
  3456. SetPlayerInterior(playerid,0);
  3457. SetPlayerVirtualWorld(playerid, 0);
  3458. return 1;
  3459. }
  3460. CMD:gethere(playerid,params[])
  3461. {
  3462. new targetid, Float:x, Float:y, Float:z;
  3463. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3464. else if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /gethere [playerid/partofname]");
  3465. else if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_GREY, "That player is not connected");
  3466. else
  3467. {
  3468. GetPlayerPos(playerid, x, y, z);
  3469. SetPlayerPos(targetid, x, y+0.5, z+0.5);
  3470. }
  3471. return 1;
  3472. }
  3473. CMD:goto(playerid, params[])
  3474. {
  3475. new ID;
  3476. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3477. else if(sscanf(params, "u", ID)) SendClientMessage(playerid, 0xF97804FF, "USAGE: /goto [partofname/playerid]");
  3478. else if(!IsPlayerConnected(ID)) SendClientMessage(playerid, 0xF97804FF, "Player is not connected!");
  3479. else
  3480. {
  3481. new Float:x, Float:y, Float:z;
  3482. GetPlayerPos(ID, x, y, z);
  3483. SetPlayerPos(playerid, x+1, y+1, z);
  3484. }
  3485. return 1;
  3486. }
  3487. CMD:respawn(playerid, params[])
  3488. {
  3489. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  3490. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3491. else if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /respawn [playerid/partofname]");
  3492. else if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  3493. else
  3494. {
  3495. GetPlayerName(playerid, sendername, sizeof(sendername));
  3496. sendername[strfind(sendername,"_")] = ' ';
  3497. GetPlayerName(id, name, sizeof(name));
  3498. SpawnPlayer(id);
  3499. format(string, sizeof(string), "*You have respawned player %s", name);
  3500. SendClientMessage(playerid, COLOR_YELLOW, string);
  3501. format(string, sizeof(string), "*You have been respawned by admin %s", sendername);
  3502. SendClientMessage(id, COLOR_YELLOW, string);
  3503. ABroadCast(COLOR_YELLOW,string,1);
  3504. TBroadCast(COLOR_YELLOW,string,1);
  3505. }
  3506. return 1;
  3507. }
  3508. CMD:healall(playerid, params[])
  3509. {
  3510. new sendername[MAX_PLAYER_NAME], string[128];
  3511. GetPlayerName(playerid, sendername, sizeof(sendername));
  3512. sendername[strfind(sendername,"_")] = ' ';
  3513. if(!(PlayerInfo[playerid][pAdmin] >= 4)) return SCM(playerid, COLOR_GREY,"you are not authorized to use this command");
  3514. else
  3515. {
  3516. format(string, sizeof(string), "Admin %s has healed everyone", sendername);
  3517. SendClientMessageToAll(COLOR_GREEN, string);
  3518. for(new i = 0; i < MAX_PLAYERS; i ++)
  3519. SetPlayerHealth(i,100);
  3520. }
  3521. return 1;
  3522. }
  3523. CMD:makeadmin(playerid, params[])
  3524. {
  3525. new pID, value;
  3526. if(PlayerInfo[playerid][pAdmin] < 1338 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, " you are not authorized to use this command!");
  3527. else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /makeadmin [playerid/partofname] [level 1-1338]");
  3528. else if (value < 0 || value > 1338) return SendClientMessage(playerid, 0xFF0000AA, "Unknown level! Only 0 to 1338");
  3529. else if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3530. else
  3531. {
  3532. new pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
  3533. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  3534. GetPlayerName(pID, tName, MAX_PLAYER_NAME);
  3535. format(string, sizeof(string), "You have promoted %s to Admin level %i", tName, value);
  3536. SCM(playerid, COLOR_LIGHTBLUE, string);
  3537. format(string, sizeof(string), "You have been promoted to Admin level %i by %s", value, pName);
  3538. SCM(pID, COLOR_LIGHTBLUE, string);
  3539. PlayerInfo[pID][pAdmin] = value;
  3540. }
  3541. return 1;
  3542. }
  3543. CMD:maketester(playerid, params[])
  3544. {
  3545. new pID, value;
  3546. if(PlayerInfo[playerid][pAdmin] < 1338 && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, " you are not authorized to use this command!");
  3547. else if (sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /maketester [playerid/partofname] [1]");
  3548. else if (value < 0 || value > 1) return SendClientMessage(playerid, 0xFF0000AA, "Unknown level! Available level: 1");
  3549. else if(pID == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3550. else
  3551. {
  3552. new pName[MAX_PLAYER_NAME], tName[MAX_PLAYER_NAME], string[128];
  3553. GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
  3554. GetPlayerName(pID, tName, MAX_PLAYER_NAME);
  3555. format(string, sizeof(string), "You have promoted %s to Tester", tName);
  3556. SCM(playerid, COLOR_LIGHTBLUE, string);
  3557. format(string, sizeof(string), "You have been promoted to Tester by %s", pName);
  3558. SCM(pID, COLOR_LIGHTBLUE, string);
  3559. PlayerInfo[pID][pTester] = value;
  3560. }
  3561. return 1;
  3562. }
  3563. CMD:warn(playerid, params[])
  3564. {
  3565. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], reason[35], string[128];
  3566. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3567. if(sscanf(params,"uz",id,reason)) return SCM(playerid, COLOR_WHITE,"USAGE: /warn [playerid/partofname] [reason]");
  3568. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3569. else
  3570. {
  3571. if(PlayerInfo[id][pWarns] >= 5)
  3572. {
  3573. format(string, sizeof(string), "AdmCmd: %s was banned by %s (Had 5 Warnings) reason %s", name, sendername, reason);
  3574. SendClientMessageToAll(COLOR_LIGHTRED, string);
  3575. PlayerInfo[id][pLocked] = 1;
  3576. new plrIP[16];
  3577. GetPlayerIp(id,plrIP, sizeof(plrIP));
  3578. SendClientMessage(id,COLOR_DBLUE,"|___________[BAN INFO]___________|");
  3579. format(string, sizeof(string), "Your name: %s.",name);
  3580. SendClientMessage(id, COLOR_WHITE, string);
  3581. format(string, sizeof(string), "Your ip is: %s.",plrIP);
  3582. SendClientMessage(id, COLOR_WHITE, string);
  3583. format(string, sizeof(string), "You were banned by: %s.",sendername);
  3584. SendClientMessage(id, COLOR_WHITE, string);
  3585. format(string, sizeof(string), "You were banned for: %s.",reason);
  3586. SendClientMessage(id, COLOR_WHITE, string);
  3587. SendClientMessage(id,COLOR_DBLUE,"|___________[BAN INFO]___________|");
  3588. Ban(id);
  3589. }
  3590. PlayerInfo[id][pWarns] += 1;
  3591. GetPlayerName(playerid, sendername, sizeof(sendername));
  3592. sendername[strfind(sendername,"_")] = ' ';
  3593. GetPlayerName(id, name, sizeof(name));
  3594. format(string, sizeof(string), "You were warned by %s, reason: %s", sendername, reason);
  3595. SendClientMessage(id, COLOR_LIGHTRED, string);
  3596. format(string, sizeof(string), "AdmCmd: %s was warned by %s, reason %s", name, sendername, reason);
  3597. SendClientMessageToAll(COLOR_LIGHTRED,string);
  3598. }
  3599. return 1;
  3600. }
  3601. CMD:unmute(playerid,params[])
  3602. {
  3603. new id, name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], string[128];
  3604. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3605. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /unmute [playerid/partofname]");
  3606. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  3607. else
  3608. {
  3609. PlayerInfo[id][pMuted] = 0;
  3610. PlayerInfo[id][pMuteTime] = 0;
  3611. GetPlayerName(playerid,name1,sizeof(name1));
  3612. GetPlayerName(id,name2,sizeof(name2));
  3613. format(string, sizeof(string),"%s has been unsilenced by %s", name2, name1);
  3614. SendClientMessageToAll(COLOR_LIGHTRED,string);
  3615. }
  3616. return 1;
  3617. }
  3618. CMD:mute(playerid,params[])
  3619. {
  3620. new id,time,name1[MAX_PLAYER_NAME],reason[35],name2[MAX_PLAYER_NAME], string[128];
  3621. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3622. if(sscanf(params,"uiz", id, time, reason)) return SCM(playerid, COLOR_GREY,"USAGE: /mute [playerid/partofname] [minutes] [reason]");
  3623. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3624. else
  3625. {
  3626. PlayerInfo[id][pMuted] = 1;
  3627. PlayerInfo[id][pMuteTime] = time*60;
  3628. GetPlayerName(playerid,name1,sizeof(name1));
  3629. GetPlayerName(id,name2,sizeof(name2));
  3630. format(string, sizeof(string), "AdmCmd: %s was silenced by %s for %d minute(s) reason: %s",name2 ,name1,time,reason);
  3631. SendClientMessageToAll(COLOR_LIGHTRED,string);
  3632. }
  3633. return 1;
  3634. }
  3635. CMD:report(playerid,params[])
  3636. {
  3637. new id, reason[35], string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
  3638. if(sscanf(params,"uz", id, reason)) return SCM(playerid, COLOR_GREY,"USAGE: /report [playerid/partofname] [reason]");
  3639. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  3640. else
  3641. {
  3642. GetPlayerName(id, name,sizeof(name));
  3643. GetPlayerName(playerid, sendername, sizeof(sendername));
  3644. sendername[strfind(sendername,"_")] = ' ';
  3645. format(string, sizeof(string), "[ID:%d] %s has reported %s: %s.", playerid, sendername, name, reason);
  3646. ABroadCast(COLOR_LIGHTRED,string,1);
  3647. format(string, sizeof(string), "Use /markfalse [id] or /acceptreport [id]");
  3648. ABroadCast(COLOR_LIGHTBLUE,string,1);
  3649. format(string, sizeof(string), "Your report was just send to the online admins, please wait for a reply");
  3650. SendClientMessage(playerid,COLOR_LIGHTRED,string);
  3651. PlayerNeedsHelp[playerid] = 1;
  3652. return 1;
  3653. }
  3654. }
  3655. CMD:kick(playerid,params[])
  3656. {
  3657. new id,name1[MAX_PLAYER_NAME], reason[35],name2[MAX_PLAYER_NAME], string[128];
  3658. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3659. if(sscanf(params,"uz",id,reason)) return SCM(playerid, COLOR_WHITE,"USAGE: /kick [playerid/partofname] [reason]");
  3660. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3661. else
  3662. {
  3663. GetPlayerName(playerid,name1,sizeof(name1));
  3664. GetPlayerName(id,name2,sizeof(name2));
  3665. format(string, sizeof(string),"AdmCmd: %s was kicked by %s, reason: %s",name2,name1,reason);
  3666. SendClientMessageToAll(COLOR_LIGHTRED,string);
  3667. Kick(id);
  3668. }
  3669. return 1;
  3670. }
  3671. CMD:ban(playerid, params[])
  3672. {
  3673. new id, name[MAX_PLAYER_NAME], reason[35], name1[MAX_PLAYER_NAME], name2[MAX_PLAYER_NAME], string[128];
  3674. if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3675. if(sscanf(params,"uz", id, reason)) return SCM(playerid, COLOR_WHITE,"USAGE: /ban [playerid/partofname] [reason]");
  3676. if(id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY,"Invalid player id");
  3677. else
  3678. {
  3679. if(PlayerInfo[id][pAdmin] >= 1)
  3680. {
  3681. SendClientMessage(playerid,COLOR_GREY,"That player can not be banned");
  3682. GetPlayerName(playerid, name, sizeof(name));
  3683. format(string, 128, "AdmWarning: %s tryes banning an admin!", name);
  3684. ABroadCast(COLOR_YELLOW,string,1);
  3685. return 1;
  3686. }
  3687. GetPlayerName(playerid, name1, sizeof(name1));
  3688. GetPlayerName(id, name2, sizeof(name2));
  3689. format(string, sizeof(string), "AdmCmd: %s was banned by %s, reason: %s", name2, name1, reason);
  3690. SendClientMessageToAll(COLOR_LIGHTRED, string);
  3691. PlayerInfo[id][pLocked] = 1;
  3692. new plrIP[16];
  3693. GetPlayerIp(id,plrIP, sizeof(plrIP));
  3694. SendClientMessage(id,COLOR_DBLUE,"|___________[BAN INFO]___________|");
  3695. format(string, sizeof(string), "Your name: %s.",name2);
  3696. SendClientMessage(id, COLOR_WHITE, string);
  3697. format(string, sizeof(string), "Your ip is: %s.",plrIP);
  3698. SendClientMessage(id, COLOR_WHITE, string);
  3699. format(string, sizeof(string), "You were banned by: %s.",name1);
  3700. SendClientMessage(id, COLOR_WHITE, string);
  3701. format(string, sizeof(string), "You were banned for: %s.",reason);
  3702. SendClientMessage(id, COLOR_WHITE, string);
  3703. SendClientMessage(id,COLOR_DBLUE,"|___________[BAN INFO]___________|");
  3704. Ban(id);
  3705. }
  3706. return 1;
  3707. }
  3708. CMD:unbanip(playerid, params[])
  3709. {
  3710. new id, string[128], sendername[MAX_PLAYER_NAME];
  3711. if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
  3712. if(isnull(params)) return SCM(playerid,COLOR_WHITE,"USAGE: /unbanip [playerIP]");
  3713. format(string,sizeof(string),"unbanip %s",params);
  3714. SendRconCommand(string);
  3715. SendRconCommand("reloadbans");
  3716. PlayerInfo[id][pLocked] = 0;
  3717. GetPlayerName(playerid, sendername, sizeof(sendername));
  3718. format(string, 128, "[ADMIN]: %s has unbanned IP %s", sendername,params);
  3719. ABroadCast(COLOR_YELLOW,string,1);
  3720. return 1;
  3721. }
  3722. CMD:unban(playerid, params[])
  3723. {
  3724. new id, string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
  3725. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GRAD1,"You are not authorized to use this command");
  3726. else if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /unban [playername]");
  3727. else
  3728. {
  3729. PlayerInfo[id][pLocked] = 0;
  3730. GetPlayerName(playerid, sendername, sizeof(sendername));
  3731. GetPlayerName(id, name, sizeof(name));
  3732. format(string, sizeof(string),"%s has been unbanned by admin %s", name, sendername);
  3733. ABroadCast(COLOR_YELLOW,string,1);
  3734. TBroadCast(COLOR_YELLOW,string,1);
  3735. }
  3736. return 1;
  3737. }
  3738. CMD:a(playerid, params[])
  3739. {
  3740. new sendername[MAX_PLAYER_NAME], string[160];
  3741. if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3742. if(isnull(params)) return SCM(playerid,COLOR_GOLD,"USAGE: /a [chat]");
  3743. GetPlayerName(playerid,sendername,sizeof(sendername));
  3744. sendername[strfind(sendername,"_")] = ' ';
  3745. format(string,160,"*%d Admin %s: %s",PlayerInfo[playerid][pAdmin],sendername,params);
  3746. SendAdminMessage(COLOR_GOLD, string);
  3747. SendTesterMessage(COLOR_GOLD, string);
  3748. return 1;
  3749. }
  3750. CMD:tc(playerid, params[])
  3751. {
  3752. new sendername[MAX_PLAYER_NAME], string[160];
  3753. if(!(PlayerInfo[playerid][pTester] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3754. if(isnull(params)) return SCM(playerid,COLOR_GOLD,"USAGE: /tc [chat]");
  3755. GetPlayerName(playerid,sendername,sizeof(sendername));
  3756. sendername[strfind(sendername,"_")] = ' ';
  3757. format(string,160,"*Tester %s: %s",sendername,params);
  3758. SendAdminMessage(COLOR_GOLD, string);
  3759. SendTesterMessage(COLOR_GOLD, string);
  3760. return 1;
  3761. }
  3762. CMD:n(playerid, params[])
  3763. {
  3764. new sendername[MAX_PLAYER_NAME], string[160];
  3765. if(isnull(params)) return SCM(playerid,COLOR_GREEN,"USAGE: /n [AskQustions/Help]");
  3766. GetPlayerName(playerid,sendername,sizeof(sendername));
  3767. sendername[strfind(sendername,"_")] = ' ';
  3768. if(PlayerInfo[playerid][pMuted] == 1)
  3769. {
  3770. SendClientMessage(playerid, COLOR_RED, " You can't speak, you have been silenced !");
  3771. return 1;
  3772. }
  3773. if (PlayerInfo[playerid][pAdmin] < 1)
  3774. {
  3775. format(string, sizeof(string), "* Newbie Level %d (%d)%s: %s", PlayerInfo[playerid][pLevel], playerid, sendername, params);
  3776. }
  3777. else
  3778. {
  3779. format(string, sizeof(string), "* %d Admin {FFAF00}%s: {C9FFAB}%s", PlayerInfo[playerid][pAdmin],sendername, params);
  3780. }
  3781. if(PlayerInfo[playerid][pTester] == 1)
  3782. {
  3783. format(string, sizeof(string), "* Tester {C9FFAB}%s: {FFAF00}%s", sendername, params);
  3784. }
  3785. if(ntimer[playerid] < 1 || PlayerInfo[playerid][pAdmin] >=1 || PlayerInfo[playerid][pTester] >= 1)
  3786. { }
  3787. else
  3788. {
  3789. SendClientMessage(playerid, COLOR_GREY, "You must wait 30 seconds for every message");
  3790. return 1;
  3791. }
  3792. for (new n=0; n<MAX_PLAYERS; n++)
  3793. {
  3794. if (IsPlayerConnected(n) && (PlayerInfo[n][pLevel] < 4 || PlayerInfo[n][pAdmin] > 0) || PlayerInfo[n][pTester] > 0)
  3795. {
  3796. SendClientMessage(n, COLOR_LIGHTGREEN, string);
  3797. ntimer[playerid] = 30;
  3798. }
  3799. }
  3800. return 1;
  3801. }
  3802. CMD:cc(playerid, params[])
  3803. {
  3804. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3805. else
  3806. {
  3807. new string[128], sendername[MAX_PLAYER_NAME];
  3808. ClearChatboxToAll(playerid,100);
  3809. GetPlayerName(playerid, sendername, sizeof(sendername));
  3810. sendername[strfind(sendername,"_")] = ' ';
  3811. format(string, sizeof(string),"AdmCmd: %s has cleared the chat", sendername);
  3812. SendClientMessageToAll(COLOR_LIGHTRED,string);
  3813. }
  3814. return 1;
  3815. }
  3816. CMD:o(playerid, params[])
  3817. {
  3818. new sendername[MAX_PLAYER_NAME], string[160];
  3819. if(!(PlayerInfo[playerid][pAdmin] >= 1)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3820. if(isnull(params)) return SCM(playerid, COLOR_GREY,"USAGE: /o [chat]");
  3821. if(gPlayerLogged[playerid] == 0)
  3822. {
  3823. SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
  3824. return 1;
  3825. }
  3826. if ((noooc) && PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1)
  3827. {
  3828. SendClientMessage(playerid, COLOR_GRAD2, " The OOC channel has been disabled by an Admin !");
  3829. return 1;
  3830. }
  3831. GetPlayerName(playerid,sendername,sizeof(sendername));
  3832. sendername[strfind(sendername,"_")] = ' ';
  3833. format(string,160,"(( %s: %s ))", sendername, params);
  3834. printf("%s", string);
  3835. OOCOff(COLOR_OOC,string);
  3836. return 1;
  3837. }
  3838. CMD:noooc(playerid, params[])
  3839. {
  3840. if (PlayerInfo[playerid][pAdmin] >= 4 && (!noooc))
  3841. {
  3842. noooc = 1;
  3843. SendClientMessageToAll(COLOR_GRAD2, " OOC chat channel disabled by an Admin !");
  3844. }
  3845. else if (PlayerInfo[playerid][pAdmin] >= 3 && (noooc))
  3846. {
  3847. noooc = 0;
  3848. SendClientMessageToAll(COLOR_GRAD2, " OOC chat channel enabled by an Admin !");
  3849. }
  3850. else
  3851. {
  3852. SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
  3853. }
  3854. return 1;
  3855. }
  3856.  
  3857. CMD:me(playerid, params[])
  3858. {
  3859. new sendername[MAX_PLAYER_NAME], string[128];
  3860. GetPlayerName(playerid, sendername, sizeof(sendername));
  3861. sendername[strfind(sendername,"_")] = ' ';
  3862. if(isnull(params)) return SCM(playerid,COLOR_GREY,"USAGE: /me [action]");
  3863. format(string, sizeof(string), "*%s %s", sendername, params);
  3864. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  3865. return 1;
  3866. }
  3867. CMD:do(playerid, params[])
  3868. {
  3869. new sendername[MAX_PLAYER_NAME], string[128];
  3870. GetPlayerName(playerid, sendername, sizeof(sendername));
  3871. sendername[strfind(sendername,"_")] = ' ';
  3872. if(isnull(params)) return SCM(playerid,COLOR_GREY,"USAGE: /do [action]");
  3873. format(string, sizeof(string), "***%s (( %s ))", params, sendername);
  3874. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  3875. return 1;
  3876. }
  3877. CMD:cnc(playerid, params[])
  3878. {
  3879. if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3880. else
  3881. {
  3882. new string[128], sendername[MAX_PLAYER_NAME];
  3883. ClearChatboxToAll2(playerid,100);
  3884. GetPlayerName(playerid, sendername, sizeof(sendername));
  3885. format(string, sizeof(string), "AdmCmd: %s has cleared the newbie chat", sendername);
  3886. SendClientMessageToAll(COLOR_LIGHTRED, string);
  3887. }
  3888. return 1;
  3889. }
  3890. CMD:rac(playerid, params[])
  3891. {
  3892. if(!(PlayerInfo[playerid][pAdmin] >= 1337)) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3893. else
  3894. {
  3895. new string[128], sendername[MAX_PLAYER_NAME];
  3896. GetPlayerName(playerid, sendername, sizeof(sendername));
  3897. format(string, sizeof(string),"All unused cars will be respawned in 10 seconds by admin %s", sendername);
  3898. SendClientMessageToAll(COLOR_RED,string);
  3899. SetTimer("RACtime", 10000, 0);
  3900. }
  3901. return 1;
  3902. }
  3903. CMD:buylevel(playerid, params[])
  3904. {
  3905. if(IsPlayerConnected(playerid))
  3906. {
  3907. if (gPlayerLogged[playerid] != 0)
  3908. {
  3909. PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
  3910. if(PlayerInfo[playerid][pLevel] >= 0)
  3911. {
  3912. new nxtlevel = PlayerInfo[playerid][pLevel]+1;
  3913. new costlevel = nxtlevel*levelcost;
  3914. new expamount = nxtlevel*levelexp;
  3915. new infostring[128];
  3916. if(GetPlayerMoney(playerid) < costlevel)
  3917. {
  3918. format(infostring, 128, " You do not have enough Cash ($%d) !",costlevel);
  3919. SendClientMessage(playerid, COLOR_GRAD1, infostring);
  3920. return 1;
  3921. }
  3922. else if (PlayerInfo[playerid][pExp] < expamount)
  3923. {
  3924. format(infostring, 128, " You need %d Respect Points, you curently have [%d] !",expamount,PlayerInfo[playerid][pExp]);
  3925. SendClientMessage(playerid, COLOR_GRAD1, infostring);
  3926. return 1;
  3927. }
  3928. else
  3929. {
  3930. new string[128];
  3931. format(string, sizeof(string), "~g~LEVEL UP~n~~w~You Are Now Level %d", PlayerInfo[playerid][pLevel]);
  3932. GivePlayerCash(playerid, (-costlevel));
  3933. PlayerInfo[playerid][pLevel]++;
  3934. if(PlayerInfo[playerid][pVip] > 0)
  3935. {
  3936. PlayerInfo[playerid][pExp] -= expamount;
  3937. new total = PlayerInfo[playerid][pExp];
  3938. if(total > 0)
  3939. {
  3940. PlayerInfo[playerid][pExp] = total;
  3941. }
  3942. else
  3943. {
  3944. PlayerInfo[playerid][pExp] -= expamount;
  3945. }
  3946. }
  3947. else
  3948. {
  3949. PlayerInfo[playerid][pExp] -= expamount;
  3950. }
  3951. GameTextForPlayer(playerid, string, 5000, 1);
  3952. }
  3953. }
  3954. return 1;
  3955. }
  3956. else
  3957. {
  3958. SendClientMessage(playerid, COLOR_GRAD1, " You are not Logged in !");
  3959. }
  3960. }
  3961. return 1;
  3962. }
  3963. CMD:aod(playerid, params[])
  3964. {
  3965. new sendername[MAX_PLAYER_NAME], string[128];
  3966. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3967. else if(AdminDuty[playerid] == 1)
  3968. {
  3969. GetPlayerName(playerid, sendername, sizeof(sendername));
  3970. sendername[strfind(sendername,"_")] = ' ';
  3971. format(string, sizeof(string), "Admin %s is now off duty.", sendername,playerid);
  3972. SendClientMessageToAll(COLOR_DBLUE,string);
  3973. AdminDuty[playerid] = 0;
  3974. SetPlayerHealth(playerid,100);
  3975. SetPlayerArmour(playerid,0);
  3976. SetOriginalColor(playerid);
  3977. }
  3978. else
  3979. {
  3980. GetPlayerName(playerid, sendername, sizeof(sendername));
  3981. sendername[strfind(sendername,"_")] = ' ';
  3982. format(string, sizeof(string), "Admin %s is now on duty.",sendername,playerid);
  3983. SendClientMessageToAll(0xFAAFBEFF,string);
  3984. AdminDuty[playerid] = 1;
  3985. SetPlayerHealth(playerid,999);
  3986. SetPlayerArmour(playerid,999);
  3987. SetPlayerColor(playerid,0xFAAFBEFF);
  3988. }
  3989. return 1;
  3990. }
  3991. CMD:tod(playerid, params[])
  3992. {
  3993. new sendername[MAX_PLAYER_NAME], string[128];
  3994. if(PlayerInfo[playerid][pTester] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  3995. else if(TesterDuty[playerid] == 1)
  3996. {
  3997. GetPlayerName(playerid, sendername, sizeof(sendername));
  3998. sendername[strfind(sendername,"_")] = ' ';
  3999. format(string, sizeof(string), "Tester %s is now off duty.", sendername,playerid);
  4000. SendClientMessageToAll(COLOR_DBLUE,string);
  4001. TesterDuty[playerid] = 0;
  4002. SetPlayerHealth(playerid,100);
  4003. SetPlayerArmour(playerid,0);
  4004. SetOriginalColor(playerid);
  4005. }
  4006. else
  4007. {
  4008. GetPlayerName(playerid, sendername, sizeof(sendername));
  4009. sendername[strfind(sendername,"_")] = ' ';
  4010. format(string, sizeof(string), "Tester %s is now on duty.",sendername,playerid);
  4011. SendClientMessageToAll(0xFAAFBEFF,string);
  4012. TesterDuty[playerid] = 1;
  4013. SetPlayerHealth(playerid,999);
  4014. SetPlayerArmour(playerid,999);
  4015. SetPlayerColor(playerid,0xFAAFBEFF);
  4016. }
  4017. return 1;
  4018. }
  4019. CMD:time(playerid, params[])
  4020. {
  4021. if(IsPlayerConnected(playerid))
  4022. {
  4023. new mtext[20];
  4024. new year, month,day;
  4025. getdate(year, month, day);
  4026. if(month == 1) { mtext = "January"; }
  4027. else if(month == 2) { mtext = "February"; }
  4028. else if(month == 3) { mtext = "March"; }
  4029. else if(month == 4) { mtext = "April"; }
  4030. else if(month == 5) { mtext = "May"; }
  4031. else if(month == 6) { mtext = "June"; }
  4032. else if(month == 7) { mtext = "Juli"; }
  4033. else if(month == 8) { mtext = "August"; }
  4034. else if(month == 9) { mtext = "September"; }
  4035. else if(month == 10) { mtext = "October"; }
  4036. else if(month == 11) { mtext = "November"; }
  4037. else if(month == 12) { mtext = "December"; }
  4038. new hour,minuite,second;
  4039. gettime(hour,minuite,second);
  4040. FixHour(hour);
  4041. hour = shifthour;
  4042. new string[128];
  4043. format(string, sizeof(string), "~y~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
  4044. GameTextForPlayer(playerid, string, 5000, 1);
  4045. }
  4046. return 1;
  4047. }
  4048. CMD:rules(playerid, params[])
  4049. {
  4050. SendClientMessage(playerid, COLOR_GRAD1,"Read our /forum rules");
  4051. return 1;
  4052. }
  4053. CMD:forum(playerid, params[])
  4054. {
  4055. SCM(playerid, COLOR_GRAD1,"Forum not yet ^^ ");
  4056. return 1;
  4057. }
  4058. CMD:s(playerid,params[])
  4059. {
  4060. if(PlayerInfo[playerid][pMuted] == 1)
  4061. {
  4062. SendClientMessage(playerid, COLOR_RED,"You can't speak you have been silenced");
  4063. return 1;
  4064. }
  4065. if(isnull(params)) return SCM(playerid, COLOR_GREY,"/s [text]");
  4066. new sendername[MAX_PLAYER_NAME], string[128];
  4067. GetPlayerName(playerid, sendername, sizeof(sendername));
  4068. format(string, sizeof(string), "%s Shouts: %s!!", sendername, params);
  4069. ProxDetector(30.0, playerid, string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_FADE1,COLOR_FADE2);
  4070. return 1;
  4071. }
  4072. CMD:shout(playerid, params[])
  4073. {
  4074. return cmd_s(playerid, params);
  4075. }
  4076. CMD:b(playerid,params[])
  4077. {
  4078. if(PlayerInfo[playerid][pMuted] == 1)
  4079. {
  4080. SCM(playerid, COLOR_RED,"You can't speak you have been silenced");
  4081. return 1;
  4082. }
  4083. if(isnull(params)) return SCM(playerid, COLOR_GREY,"/b [local ooc chat]");
  4084. new sendername[MAX_PLAYER_NAME], string[128];
  4085. GetPlayerName(playerid,sendername,sizeof(sendername));
  4086. sendername[strfind(sendername,"_")] = ' ';
  4087. format(string, sizeof(string), "%s Says: (( %s ))", sendername, params);
  4088. ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  4089. return 1;
  4090. }
  4091. CMD:booc(playerid, params[])
  4092. {
  4093. return cmd_b(playerid, params);
  4094. }
  4095. CMD:low(playerid,params[])
  4096. {
  4097. if(PlayerInfo[playerid][pMuted] == 1)
  4098. {
  4099. SCM(playerid, COLOR_RED,"You can't speec you have been silenced");
  4100. return 1;
  4101. }
  4102. if(isnull(params)) return SCM(playerid, COLOR_GREY,"/low [low chat]");
  4103. new sendername[MAX_PLAYER_NAME], string[128];
  4104. GetPlayerName(playerid,sendername,sizeof(sendername));
  4105. sendername[strfind(sendername,"_")] = ' ';
  4106. format(string,sizeof(string), "%s Says [Low]: %s", sendername, params);
  4107. ProxDetector(3.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  4108. return 1;
  4109. }
  4110. CMD:acceptreport(playerid, params[])
  4111. {
  4112. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4113. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  4114. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY," USAGE: /acceptreport [playerid]");
  4115. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Player not connected");
  4116. else
  4117. {
  4118. if(PlayerNeedsHelp[id] == 1)
  4119. {
  4120. PlayerNeedsHelp[id] = 0;
  4121. GetPlayerName(playerid, sendername, sizeof(sendername));
  4122. GetPlayerName(id, name, sizeof(name));
  4123. format(string, sizeof(string), "[AdminCMD]: %s has just accepted the report of [ID:%d]%s.", sendername, id, name);
  4124. ABroadCast(COLOR_YELLOW, string, 1);
  4125. format(string, sizeof(string), "**[ID:%d] %s has accepted your report and now ready to assist you! Please be patience.", playerid, sendername);
  4126. SendClientMessage(id, 0x4D903DAA, string);
  4127. }
  4128. else return SCM(playerid, COLOR_GREY,"Player don't need help!");
  4129. }
  4130. return 1;
  4131. }
  4132. CMD:markfalse(playerid, params[])
  4133. {
  4134. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4135. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  4136. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY," USAGE: /markfalse [playerid]");
  4137. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Player not connected");
  4138. else
  4139. {
  4140. if(PlayerNeedsHelp[id] == 1)
  4141. {
  4142. PlayerNeedsHelp[id] = 0;
  4143. GetPlayerName(playerid, sendername, sizeof(sendername));
  4144. GetPlayerName(id, name, sizeof(name));
  4145. format(string, sizeof(string), "[AdminCMD]: %s has just marked as fals the report of [ID:%d]%s.", sendername, id, name);
  4146. ABroadCast(COLOR_YELLOW, string, 1);
  4147. format(string, sizeof(string), "**[ID:%d] %s has denied your report, please next time make sure what you report.", playerid, sendername);
  4148. SendClientMessage(id, 0x4D903DAA, string);
  4149. }
  4150. else return SCM(playerid, COLOR_GREY,"Player don't need help!");
  4151. }
  4152. return 1;
  4153. }
  4154. CMD:id(playerid, params[])
  4155. {
  4156. new id, name[MAX_PLAYER_NAME], string[128];
  4157. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /id [playerid/partofname]");
  4158. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Player not connected");
  4159. else
  4160. {
  4161. GetPlayerName(id, name, sizeof(name));
  4162. format(string,sizeof(string), "ID: (%d) %s", id, name);
  4163. SendClientMessage(playerid, COLOR_GRAD1, string);
  4164. }
  4165. return 1;
  4166. }
  4167.  
  4168. CMD:pm(playerid, params[])
  4169. {
  4170. new PID, reason[35], pName[MAX_PLAYER_NAME], Sender[MAX_PLAYER_NAME];
  4171. if(sscanf(params, "uz", PID, reason)) return SendClientMessage(playerid, 0xFF0000FF, "Usage: /PM < PlayerID > < Message >");
  4172. if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, 0xFF0000FF, "That user is not connected!");
  4173. else
  4174. {
  4175. new Str[128];
  4176. GetPlayerName(PID, pName, sizeof(pName));
  4177. GetPlayerName(playerid, Sender, sizeof(Sender));
  4178. format(Str, sizeof(Str), "(( PM From: %s(%d): %s ))", Sender, playerid, reason);
  4179. SendClientMessage(PID, COLOR_GOLD, Str);
  4180. format(Str, sizeof(Str), "(( PM Sent To: %s(%d): %s ))", pName, PID, reason);
  4181. SendClientMessage(playerid, COLOR_GOLD, Str);
  4182. }
  4183. return 1;
  4184. }
  4185. CMD:whisper(playerid, params[])
  4186. {
  4187. new id, text[35], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4188. if(sscanf(params,"uz", id, text)) return SCM(playerid, COLOR_GREY,"USAGE: /(w)hisper [playerid/partofname] [text]");
  4189. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4190. else
  4191. {
  4192. new Float:x, Float:y, Float:z;
  4193. GetPlayerPos(id,x,y,z);
  4194. if(PlayerToPoint(5, playerid, x,y,z))
  4195. {
  4196. GetPlayerName(playerid, sendername,sizeof(sendername));
  4197. GetPlayerName(id, name, sizeof(name));
  4198. if(id == playerid)
  4199. {
  4200. format(string,sizeof(string),"%s mutters something", sendername);
  4201. ProxDetector(5.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  4202. }
  4203. else
  4204. {
  4205. format(string,sizeof(string),"%s whispers something to %s", sendername, name);
  4206. ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  4207. }
  4208. format(string, sizeof(string), "%s whispers: %s", sendername, text);
  4209. SendClientMessage(id, COLOR_YELLOW3, string);
  4210. format(string, sizeof(string), "%s whispers: %s", sendername, text);
  4211. SendClientMessage(playerid, COLOR_YELLOW3, string);
  4212. }
  4213. else return SCM(playerid, COLOR_GREY,"That player is not near you");
  4214. }
  4215. return 1;
  4216. }
  4217. CMD:w(playerid, params[])
  4218. {
  4219. return cmd_whisper(playerid, params);
  4220. }
  4221. CMD:helpme(playerid, params[])
  4222. {
  4223. new string[128], sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], id;
  4224. if(isnull(params)) return SCM(playerid, COLOR_GREY,"USAGE:/helpme [description]");
  4225. GetPlayerName(playerid,sendername,sizeof(sendername));
  4226. GetPlayerName(id,name,sizeof(name));
  4227. format(string,sizeof(string),"TesterCmd: %s has requested for help: %s", sendername, params);
  4228. TBroadCast(COLOR_LIGHTBLUE,string,1);
  4229. SendClientMessage(playerid, COLOR_LIGHTBLUE,"You have requested for help, please wait for a reply");
  4230. return 1;
  4231. }
  4232. CMD:ad(playerid, params[])
  4233. {
  4234. new string[128], sendername[MAX_PLAYER_NAME];
  4235. if(isnull(params)) return SCM(playerid, COLOR_GREY,"USAGE:/ad [advertisement]");
  4236. if(PlayerInfo[playerid][pMuted] == 1) return SendClientMessage(playerid, COLOR_RED, "You can't speak, you have been silenced");
  4237. if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1738.7830, -1269.8062, 13.5433)) return SendClientMessage(playerid,COLOR_RED,"Your far than 50 metters from the Advertisment Building!");
  4238. GetPlayerName(playerid, sendername, sizeof(sendername));
  4239. format(string, sizeof(string), "[Advertisment]: %s, Contact %s ,Phone: %d", params, sendername ,PlayerInfo[playerid][pNumber]);
  4240. SendClientMessageToAll(COLOR_GREEN,string);
  4241. GivePlayerCash(playerid, -50);
  4242. SendClientMessage(playerid,COLOR_WHITE,"The advertisment costs 50$!");
  4243. return 1;
  4244. }
  4245. CMD:pay(playerid, params[])
  4246. {
  4247. new id, money, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4248. if(sscanf(params,"ui", id, money)) return SCM(playerid, COLOR_GREY,"USAGE:/pay [playerid/partofname] [ammount]");
  4249. if(money < 1 || money > 100000) return SendClientMessage(playerid, COLOR_GRAD1, "You can't pay less than 1$ or more than 100k $.");
  4250. if(!ProxDetectorS(5.0, playerid, id)) return SCM(playerid, COLOR_GRAD1,"You are too far away from that player");
  4251. else
  4252. {
  4253. GetPlayerName(id, name, sizeof(name));
  4254. GetPlayerName(playerid, sendername, sizeof(sendername));
  4255. new pmoney = GetPlayerMoney(playerid);
  4256. if (money > 0 && pmoney >= money)
  4257. {
  4258. GivePlayerCash(playerid, (0 - money));
  4259. GivePlayerCash(id, money);
  4260. format(string, sizeof(string), "You payed %s(ID: %d) $%d.", name,id, money);
  4261. SendClientMessage(playerid, COLOR_GREEN, string);
  4262. format(string, sizeof(string), "You recieved $%d from %s(ID: %d).", money, sendername, playerid);
  4263. SendClientMessage(id, COLOR_GREEN, string);
  4264. format(string, sizeof(string), "[AdminCMD]: %s payed $%d to %s.", sendername, money, name);
  4265. if(money >= 70000)
  4266. {
  4267. ABroadCast(COLOR_RED,string,1);
  4268. }
  4269. format(string, sizeof(string), "* %s takes out %d$ from his pocket and hands it to %s.", sendername , money ,name);
  4270. ProxDetector(30.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
  4271. ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
  4272. }
  4273. }
  4274. return 1;
  4275. }
  4276. CMD:givemoney(playerid, params[])
  4277. {
  4278. new id, cash, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4279. if(PlayerInfo[playerid][pAdmin] < 1337) return SCM(playerid, COLOR_GREY,"You are not authorized to use this command");
  4280. if(sscanf(params,"ui", id, cash)) return SCM(playerid, COLOR_GREY,"USAGE: /givemoney [playerid/partofname] [ammount]");
  4281. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4282. else
  4283. {
  4284. GivePlayerCash(id, cash);
  4285. GetPlayerName(playerid,sendername,sizeof(sendername));
  4286. GetPlayerName(id,name,sizeof(name));
  4287. format(string,sizeof(string),"%s has given %s money to %d", sendername, name, cash);
  4288. ABroadCast(COLOR_YELLOW,string,1);
  4289. format(string,sizeof(string),"You have recieved %d money from admin %s", cash, sendername);
  4290. SendClientMessage(id, COLOR_YELLOW, string);
  4291. }
  4292. return 1;
  4293. }
  4294. CMD:call(playerid, params[])
  4295. {
  4296. new number, sendername[MAX_PLAYER_NAME], string[128];
  4297. if(sscanf(params,"i", number))
  4298. {
  4299. SendClientMessage(playerid, COLOR_GREEN, "____________Services number list____________");
  4300. SendClientMessage(playerid, COLOR_GREEN, "/call [number]");
  4301. SendClientMessage(playerid, COLOR_WHITE, "[Emergency]911 - Emergency Line || 103 - L.S-E.M.S");
  4302. SendClientMessage(playerid, COLOR_WHITE, "[Services]445 - Taxi Company || 235 - Mechanic");
  4303. SendClientMessage(playerid, COLOR_GREEN, "____________________________________________");
  4304. return 1;
  4305. }
  4306. if(number == PlayerInfo[playerid][pNumber]) return SCM(playerid, COLOR_GREY,"Can't call yourself");
  4307. if(Mobile[playerid] != 255) return SCM(playerid, COLOR_GREY,"Already in a call");
  4308. GetPlayerName(playerid,sendername,sizeof(sendername));
  4309. format(string, sizeof(string), "* %s takes his cellphone out.", sendername);
  4310. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  4311. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  4312. for(new i = 0; i < MAX_PLAYERS; i++)
  4313. {
  4314. if(IsPlayerConnected(i))
  4315. {
  4316. if(PlayerInfo[i][pNumber] == number && number != 0)
  4317. {
  4318. new giveplayerid;
  4319. giveplayerid = i;
  4320. Mobile[playerid] = giveplayerid;
  4321. if(IsPlayerConnected(giveplayerid))
  4322. {
  4323. if(giveplayerid != INVALID_PLAYER_ID)
  4324. {
  4325. if (Mobile[giveplayerid] == 255)
  4326. {
  4327. format(string, sizeof(string), "[Mobile] Your mobile phone is ringing (/pickup) Caller: %d", PlayerInfo[playerid][pNumber]);
  4328. SendClientMessage(giveplayerid, COLOR_YELLOW, string);
  4329. GetPlayerName(giveplayerid, sendername, sizeof(sendername));
  4330. RingTone[giveplayerid] = 10;
  4331. format(string, sizeof(string), "* %s's phone is ringing.", sendername);
  4332. ProxDetector(30.0, i, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  4333. CellTime[playerid] = 1;
  4334. return 1;
  4335. }
  4336. }
  4337. }
  4338. }
  4339. }
  4340. }
  4341. return 1;
  4342.  
  4343. }
  4344. CMD:c(playerid, params[])
  4345. {
  4346. return cmd_call(playerid, params);
  4347. }
  4348. CMD:pickup(playerid, params[])
  4349. {
  4350. if(IsPlayerConnected(playerid))
  4351. {
  4352. if(Mobile[playerid] != 255)
  4353. {
  4354. SendClientMessage(playerid, COLOR_GREY, "You are already on a call...");
  4355. return 1;
  4356. }
  4357. for(new i = 0; i < MAX_PLAYERS; i++)
  4358. {
  4359. if(IsPlayerConnected(i))
  4360. {
  4361. if(Mobile[i] == playerid)
  4362. {
  4363. Mobile[playerid] = i;
  4364. new string[128], sendername[MAX_PLAYER_NAME];
  4365. GetPlayerName(playerid,sendername,sizeof(sendername));
  4366. SendClientMessage(i, COLOR_YELLOW2, "They Picked up the call...");
  4367. format(string, sizeof(string), "* %s answers his cellphone.", sendername);
  4368. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
  4369. ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
  4370. RingTone[playerid] = 0;
  4371. }
  4372.  
  4373. }
  4374. }
  4375. }
  4376. return 1;
  4377. }
  4378. CMD:p(playerid, params[])
  4379. {
  4380. return cmd_pickup(playerid, params);
  4381. }
  4382. CMD:hangup(playerid, params[])
  4383. {
  4384. if(IsPlayerConnected(playerid))
  4385. {
  4386. new caller = Mobile[playerid];
  4387. if(IsPlayerConnected(caller))
  4388. {
  4389. if(caller != INVALID_PLAYER_ID)
  4390. {
  4391. if(caller != 255)
  4392. {
  4393. if(caller < 255)
  4394. {
  4395. SendClientMessage(caller, COLOR_GREY, "They hung up...");
  4396. CellTime[caller] = 0;
  4397. CellTime[playerid] = 0;
  4398. SendClientMessage(playerid, COLOR_GREY, "You hung up....");
  4399. Mobile[caller] = 255;
  4400. }
  4401. }
  4402. }
  4403. }
  4404. new string[128];
  4405. GivePlayerCash(playerid,-CellTime[playerid]);
  4406. format(string,sizeof(string),"You have paid %d $ for your conversation!",CellTime[playerid]);
  4407. GameTextForPlayer(playerid,string,5000,1);
  4408. Mobile[playerid] = 255;
  4409. CellTime[playerid] = 0;
  4410. RingTone[playerid] = 0;
  4411. SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);
  4412. }
  4413. return 1;
  4414. }
  4415. CMD:h(playerid, params[])
  4416. {
  4417. return cmd_hangup(playerid, params);
  4418. }
  4419. CMD:number(playerid, params[])
  4420. {
  4421. new id, sendername[MAX_PLAYER_NAME], string[128];
  4422. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /number [playerid/partofname]");
  4423. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4424. else
  4425. {
  4426. GetPlayerName(id, sendername, sizeof(sendername));
  4427. format(string, 256, "Name: %s, Ph: %d",sendername,PlayerInfo[id][pNumber]);
  4428. SendClientMessage(playerid, COLOR_GRAD1, string);
  4429. }
  4430. return 1;
  4431. }
  4432. CMD:stopanim(playerid, params[])
  4433. {
  4434. ClearAnimations(playerid);
  4435. ApplyAnimation(playerid, "CARRY", "crry_prtial", 1.0, 0, 0, 0, 0, 0);
  4436. TogglePlayerControllable(playerid, 1);
  4437. return 1;
  4438. }
  4439. CMD:newspaper(playerid, params[])
  4440. {
  4441. if(!IsPlayerInRangeOfPoint(playerid, 4,1707.8434,-2331.6506,-2.6797)) return SCM(playerid, COLOR_GREY,"You are not near the news paper");
  4442. else
  4443. {
  4444. SetPlayerPos(playerid,1708.1606,-2333.2563,-2.3670);
  4445. SetPlayerFacingAngle(playerid, 353.5373);
  4446. TogglePlayerControllable(playerid, 0);
  4447. LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  4448. ShowMenuForPlayer(Paper, playerid);
  4449. }
  4450. return 1;
  4451. }
  4452. CMD:exitcar(playerid, params[])
  4453. {
  4454. if(IsPlayerInVehicle(playerid, dmvc) || IsPlayerInVehicle(playerid, dmvc1) || IsPlayerInVehicle(playerid,dmvc2))
  4455. {
  4456. RemovePlayerFromVehicle(playerid);
  4457. TogglePlayerControllable(playerid, 1);
  4458. SetTimer("Unfreeze", 1000, 1);
  4459. }
  4460. return 1;
  4461. }
  4462. CMD:takeexam(playerid, params[])
  4463. {
  4464. if(PlayerInfo[playerid][pDriveLic] == 1) return SCM(playerid, COLOR_GREY,"You already have Driving License!");
  4465. if(IsPlayerInVehicle(playerid, dmvc) || IsPlayerInVehicle(playerid, dmvc1) || IsPlayerInVehicle(playerid,dmvc2))
  4466. {
  4467. TogglePlayerControllable(playerid, 1);
  4468. CP[playerid] = 200;
  4469. SetPlayerCheckpoint(playerid, 1421.1475,-1699.3237,13.2888, 4.0);
  4470. TakingLesson[playerid] = 1;
  4471. SendClientMessage(playerid, COLOR_LIGHTBLUE, "DMV: Please follow the checkpoints and drive safety!");
  4472. }
  4473. else return SCM(playerid, COLOR_GREY,"You are not in a DMV car");
  4474. return 1;
  4475. }
  4476. CMD:freeze(playerid, params[])
  4477. {
  4478. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4479. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"You are not authorized to use this command");
  4480. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /freeze [playerid/partofname]");
  4481. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4482. else
  4483. {
  4484. GetPlayerName(playerid,sendername,sizeof(sendername));
  4485. GetPlayerName(id,name,sizeof(name));
  4486. TogglePlayerControllable(id, 0);
  4487. format(string, sizeof(string), "AdmCmd: %s has freezed %s", sendername, name);
  4488. ABroadCast(COLOR_YELLOW,string,1);
  4489. format(string, sizeof(string),"You have been frozen by admin %s", sendername);
  4490. SendClientMessage(id, COLOR_LIGHTRED, string);
  4491. }
  4492. return 1;
  4493. }
  4494. CMD:unfreeze(playerid, params[])
  4495. {
  4496. new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  4497. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"You are not authorized to use this command");
  4498. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /unfreeze [playerid/partofname]");
  4499. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4500. else
  4501. {
  4502. GetPlayerName(playerid,sendername,sizeof(sendername));
  4503. GetPlayerName(id,name,sizeof(name));
  4504. TogglePlayerControllable(id, 1);
  4505. format(string, sizeof(string), "AdmCmd: %s has unfreezed %s", sendername, name);
  4506. ABroadCast(COLOR_YELLOW,string,1);
  4507. format(string, sizeof(string),"You have been unfreezed by admin %s", sendername);
  4508. SendClientMessage(id, COLOR_LIGHTRED, string);
  4509. }
  4510. return 1;
  4511. }
  4512. CMD:check(playerid, params[])
  4513. {
  4514. new id;
  4515. if(PlayerInfo[playerid][pAdmin] < 1) return SCM(playerid,COLOR_GREY,"You are not authorized to use this command");
  4516. if(sscanf(params,"u", id)) return SCM(playerid, COLOR_GREY,"USAGE: /check [playerid/partofname]");
  4517. if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_GREY,"Invalid player ID");
  4518. else
  4519. {
  4520. ShowStats(playerid, id);
  4521. }
  4522. return 1;
  4523. }
  4524. //===================================================DEALERSHIP=============================================================
  4525. CMD:tow(playerid, params[])
  4526. {
  4527. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4528. new vehicleid = GetPlayerVehicleID(playerid);
  4529. if(IsTrailerAttachedToVehicle(vehicleid))
  4530. {
  4531. DetachTrailerFromVehicle(vehicleid);
  4532. SendClientMessage(playerid, COLOR_WHITE, "You are not towing anymore");
  4533. return 1;
  4534. }
  4535. new Float:x, Float:y, Float:z;
  4536. new Float:dist, Float:closedist=8, closeveh;
  4537. for(new i=1; i < MAX_VEHICLES; i++)
  4538. {
  4539. if(i != vehicleid && GetVehiclePos(i, x, y, z))
  4540. {
  4541. dist = GetPlayerDistanceFromPoint(playerid, x, y, z);
  4542. if(dist < closedist)
  4543. {
  4544. closedist = dist;
  4545. closeveh = i;
  4546. }
  4547. }
  4548. }
  4549. if(!closeveh) return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
  4550. AttachTrailerToVehicle(closeveh, vehicleid);
  4551. SendClientMessage(playerid, COLOR_WHITE, "You are now towing a vehicle");
  4552. return 1;
  4553. }
  4554.  
  4555. CMD:eject(playerid, params[])
  4556. {
  4557. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4558. new pid, msg[128];
  4559. if(sscanf(params, "u", pid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /eject [player]");
  4560. if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_RED, "Invalid player!");
  4561. new vehicleid = GetPlayerVehicleID(playerid);
  4562. if(!IsPlayerInVehicle(pid, vehicleid)) return SendClientMessage(playerid, COLOR_RED, "Player is not in your vehicle!");
  4563. RemovePlayerFromVehicle(pid);
  4564. format(msg, sizeof(msg), "Vehicle driver %s (%d) has ejected you", PlayerName(playerid), playerid);
  4565. SendClientMessage(pid, COLOR_WHITE, msg);
  4566. format(msg, sizeof(msg), "You have ejected %s (%d) from your vehicle", PlayerName(pid), pid);
  4567. SendClientMessage(playerid, COLOR_WHITE, msg);
  4568. return 1;
  4569. }
  4570.  
  4571. CMD:ejectall(playerid, params[])
  4572. {
  4573. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4574. new vehicleid = GetPlayerVehicleID(playerid);
  4575. new msg[128];
  4576. format(msg, sizeof(msg), "Vehicle driver %s (%d) has ejected you", PlayerName(playerid), playerid);
  4577. for(new i=0; i < MAX_PLAYERS; i++)
  4578. {
  4579. if(IsPlayerConnected(i) && i != playerid && IsPlayerInVehicle(i, vehicleid))
  4580. {
  4581. RemovePlayerFromVehicle(i);
  4582. SendClientMessage(i, COLOR_WHITE, msg);
  4583. }
  4584. }
  4585. SendClientMessage(playerid, COLOR_WHITE, "You have ejected all passengers");
  4586. return 1;
  4587. }
  4588.  
  4589. CMD:clearmods(playerid, params[])
  4590. {
  4591. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4592. new vehicleid = GetPlayerVehicleID(playerid);
  4593. new id = GetVehicleID(vehicleid);
  4594. if(GetPlayerVehicleAccess(playerid, id) != 1)
  4595. return SendClientMessage(playerid, COLOR_RED, "This is not your vehicle vehicle!");
  4596. for(new i=0; i < sizeof(VehicleMods[]); i++)
  4597. {
  4598. RemoveVehicleComponent(VehicleID[id], GetVehicleComponentInSlot(VehicleID[id], i));
  4599. VehicleMods[id][i] = 0;
  4600. }
  4601. VehiclePaintjob[id] = 255;
  4602. ChangeVehiclePaintjob(VehicleID[id], 255);
  4603. SaveVehicle(id);
  4604. SendClientMessage(playerid, COLOR_WHITE, "You have removed all modifications from your vehicle");
  4605. return 1;
  4606. }
  4607.  
  4608. CMD:trackcar(playerid, params[])
  4609. {
  4610. if(TrackCar[playerid])
  4611. {
  4612. TrackCar[playerid] = 0;
  4613. DisablePlayerCheckpoint(playerid);
  4614. SendClientMessage(playerid, COLOR_WHITE, "You are not tracking your vehicle anymore");
  4615. return 1;
  4616. }
  4617. new info[256], bool:found;
  4618. for(new i=1; i < MAX_DVEHICLES; i++)
  4619. {
  4620. if(VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], PlayerName(playerid)) == 0)
  4621. {
  4622. found = true;
  4623. format(info, sizeof(info), "%sID: %d Name: %s\n", info, i, VehicleNames[VehicleModel[i]-400]);
  4624. }
  4625. }
  4626. if(!found) return SendClientMessage(playerid, COLOR_RED, "You don't have any vehicles!");
  4627. ShowPlayerDialog(playerid, DIALOG_FINDVEHICLE, DIALOG_STYLE_LIST, "Find Your Vehicle", info, "Find", "Cancel");
  4628. return 1;
  4629. }
  4630.  
  4631. CMD:v(playerid, params[])
  4632. {
  4633. if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4634. new vehicleid = GetPlayerVehicleID(playerid);
  4635. if(IsBicycle(vehicleid)) return SendClientMessage(playerid, COLOR_RED, "You are not driving a vehicle!");
  4636. new id = GetVehicleID(vehicleid);
  4637. if(!GetPlayerVehicleAccess(playerid, id))
  4638. return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4639. SetPVarInt(playerid, "DialogValue1", id);
  4640. ShowDialog(playerid, DIALOG_VEHICLE);
  4641. return 1;
  4642. }
  4643.  
  4644. CMD:sellv(playerid, params[])
  4645. {
  4646. new pid, id, price, msg[128];
  4647. if(sscanf(params, "udd", pid, id, price)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /sellv [player] [vehicleid] [price]");
  4648. if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_RED, "Invalid player!");
  4649. if(GetPlayerVehicleAccess(playerid, id) != 1)
  4650. return SendClientMessage(playerid, COLOR_RED, "You are not the owner of this vehicle!");
  4651. if(price < 1) return SendClientMessage(playerid, COLOR_RED, "Invalid price!");
  4652. if(!PlayerToPlayer(playerid, pid, 10.0)) return SendClientMessage(playerid, COLOR_RED, "Player is too far!");
  4653. SetPVarInt(pid, "DialogValue1", playerid);
  4654. SetPVarInt(pid, "DialogValue2", id);
  4655. SetPVarInt(pid, "DialogValue3", price);
  4656. ShowDialog(pid, DIALOG_VEHICLE_SELL);
  4657. format(msg, sizeof(msg), "You have offered %s (%d) to buy your vehicle for $%d", PlayerName(pid), pid, price);
  4658. SendClientMessage(playerid, COLOR_WHITE, msg);
  4659. return 1;
  4660. }
  4661.  
  4662. CMD:givecarkeys(playerid, params[])
  4663. {
  4664. new pid, id, msg[128];
  4665. if(sscanf(params, "ud", pid, id)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /givecarkeys [player] [vehicleid]");
  4666. if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_RED, "Invalid player!");
  4667. if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "Invalid vehicleid!");
  4668. if(GetPlayerVehicleAccess(playerid, id) != 1)
  4669. return SendClientMessage(playerid, COLOR_RED, "You are not the owner of this vehicle!");
  4670. if(!PlayerToPlayer(playerid, pid, 10.0)) return SendClientMessage(playerid, COLOR_RED, "Player is too far!");
  4671. SetPVarInt(pid, "CarKeys", id);
  4672. format(msg, sizeof(msg), "You have given your car keys to %s (%d)", PlayerName(pid), pid);
  4673. SendClientMessage(playerid, COLOR_WHITE, msg);
  4674. format(msg, sizeof(msg), "%s (%d) has given you car keys", PlayerName(playerid), playerid);
  4675. SendClientMessage(pid, COLOR_WHITE, msg);
  4676. return 1;
  4677. }
  4678.  
  4679. CMD:vlock(playerid, params[])
  4680. {
  4681. new vehicleid;
  4682. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  4683. {
  4684. vehicleid = GetPlayerVehicleID(playerid);
  4685. }
  4686. else
  4687. {
  4688. vehicleid = GetClosestVehicle(playerid);
  4689. if(!PlayerToVehicle(playerid, vehicleid, 5.0)) vehicleid = 0;
  4690. }
  4691. if(!vehicleid) return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
  4692. new id = GetVehicleID(vehicleid);
  4693. if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4694. if(!GetPlayerVehicleAccess(playerid, id))
  4695. return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4696. new engine, lights, alarm, doors, bonnet, boot, objective;
  4697. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  4698. if(doors == 1)
  4699. {
  4700. doors = 0;
  4701. GameTextForPlayer(playerid, "~g~doors unlocked", 3000, 6);
  4702. }
  4703. else
  4704. {
  4705. doors = 1;
  4706. GameTextForPlayer(playerid, "~r~doors locked", 3000, 6);
  4707. }
  4708. SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  4709. return 1;
  4710. }
  4711.  
  4712. CMD:valarm(playerid, params[])
  4713. {
  4714. new vehicleid;
  4715. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  4716. {
  4717. vehicleid = GetPlayerVehicleID(playerid);
  4718. }
  4719. else
  4720. {
  4721. vehicleid = GetClosestVehicle(playerid);
  4722. if(!PlayerToVehicle(playerid, vehicleid, 5.0)) vehicleid = 0;
  4723. }
  4724. if(!vehicleid) return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
  4725. new id = GetVehicleID(vehicleid);
  4726. if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4727. if(GetPlayerVehicleAccess(playerid, id) != 1)
  4728. return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4729. if(VehicleSecurity[vehicleid] == 0)
  4730. {
  4731. VehicleSecurity[vehicleid] = 1;
  4732. GameTextForPlayer(playerid, "~g~alarm on", 3000, 6);
  4733. }
  4734. else
  4735. {
  4736. ToggleAlarm(vehicleid, VEHICLE_PARAMS_OFF);
  4737. VehicleSecurity[vehicleid] = 0;
  4738. GameTextForPlayer(playerid, "~r~alarm off", 3000, 6);
  4739. }
  4740. return 1;
  4741. }
  4742.  
  4743. CMD:trunk(playerid, params[])
  4744. {
  4745. new vehicleid;
  4746. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  4747. {
  4748. vehicleid = GetPlayerVehicleID(playerid);
  4749. }
  4750. else
  4751. {
  4752. vehicleid = GetClosestVehicle(playerid);
  4753. if(!PlayerToVehicle(playerid, vehicleid, 5.0)) vehicleid = 0;
  4754. }
  4755. if(!vehicleid)
  4756. return SendClientMessage(playerid, COLOR_RED, "You are not close to a vehicle!");
  4757. new id = GetVehicleID(vehicleid);
  4758. if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4759. if(!GetPlayerVehicleAccess(playerid, id))
  4760. return SendClientMessage(playerid, COLOR_RED, "You don't have the keys for this vehicle!");
  4761. new engine, lights, alarm, doors, bonnet, boot, objective;
  4762. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  4763. SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, 1, objective);
  4764. SetPVarInt(playerid, "DialogValue1", id);
  4765. ShowDialog(playerid, DIALOG_TRUNK);
  4766. return 1;
  4767. }
  4768.  
  4769. CMD:fuel(playerid, params[])
  4770. {
  4771. for(new i=1; i < MAX_FUEL_STATIONS; i++)
  4772. {
  4773. if(FuelStationCreated[i])
  4774. {
  4775. if(IsPlayerInRangeOfPoint(playerid, 15.0, FuelStationPos[i][0], FuelStationPos[i][1], FuelStationPos[i][2]))
  4776. {
  4777. SetPVarInt(playerid, "FuelStation", i);
  4778. ShowDialog(playerid, DIALOG_FUEL);
  4779. return 1;
  4780. }
  4781. }
  4782. }
  4783. SendClientMessage(playerid, COLOR_RED, "You are not in a fuel station!");
  4784. return 1;
  4785. }
  4786.  
  4787. CMD:setfuel(playerid, params[])
  4788. {
  4789. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4790. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle!");
  4791. new amount, msg[128];
  4792. if(sscanf(params, "d", amount)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /setfuel [amount]");
  4793. if(amount < 0 || amount > 100) return SendClientMessage(playerid, COLOR_RED, "Invalid amount! (0-100)");
  4794. Fuel[GetPlayerVehicleID(playerid)] = amount;
  4795. format(msg, sizeof(msg), "You have set your vehicle fuel to %d", amount);
  4796. SendClientMessage(playerid, COLOR_WHITE, msg);
  4797. return 1;
  4798. }
  4799.  
  4800. CMD:addv(playerid, params[])
  4801. {
  4802. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4803. if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_RED, "You can't use this command now!");
  4804. new model[32], modelid, dealerid, color1, color2, price;
  4805. if(sscanf(params, "dsddd", dealerid, model, color1, color2, price))
  4806. return SendClientMessage(playerid, COLOR_GREY, "USAGE: /addv [dealerid] [model] [color1] [color2] [price]");
  4807. if(!IsValidDealership(dealerid)) return SendClientMessage(playerid, COLOR_RED, "Invalid dealerid!");
  4808. if(IsNumeric(model)) modelid = strval(model);
  4809. else modelid = GetVehicleModelIDFromName(model);
  4810. if(modelid < 400 || modelid > 611) return SendClientMessage(playerid, COLOR_RED, "Invalid model ID!");
  4811. if(color1 < 0 || color2 < 0) return SendClientMessage(playerid, COLOR_RED, "Invalid color!");
  4812. if(price < 0) return SendClientMessage(playerid, COLOR_RED, "Invalid price!");
  4813. new Float:X, Float:Y, Float:Z, Float:angle;
  4814. GetPlayerPos(playerid, X, Y, Z);
  4815. GetPlayerFacingAngle(playerid, angle);
  4816. X += floatmul(floatsin(-angle, degrees), 4.0);
  4817. Y += floatmul(floatcos(-angle, degrees), 4.0);
  4818. for(new i=1; i < MAX_DVEHICLES; i++)
  4819. {
  4820. if(!VehicleCreated[i])
  4821. {
  4822. new msg[128];
  4823. VehicleCreated[i] = VEHICLE_DEALERSHIP;
  4824. VehicleModel[i] = modelid;
  4825. VehiclePos[i][0] = X;
  4826. VehiclePos[i][1] = Y;
  4827. VehiclePos[i][2] = Z;
  4828. VehiclePos[i][3] = angle+90.0;
  4829. VehicleColor[i][0] = color1;
  4830. VehicleColor[i][1] = color2;
  4831. VehicleInterior[i] = GetPlayerInterior(playerid);
  4832. VehicleWorld[i] = GetPlayerVirtualWorld(playerid);
  4833. VehicleValue[i] = price;
  4834. valstr(VehicleOwner[i], dealerid);
  4835. VehicleNumberPlate[i] = DEFAULT_NUMBER_PLATE;
  4836. for(new d=0; d < sizeof(VehicleTrunk[]); d++)
  4837. {
  4838. VehicleTrunk[i][d][0] = 0;
  4839. VehicleTrunk[i][d][1] = 0;
  4840. }
  4841. for(new d=0; d < sizeof(VehicleMods[]); d++)
  4842. {
  4843. VehicleMods[i][d] = 0;
  4844. }
  4845. VehiclePaintjob[i] = 255;
  4846. UpdateVehicle(i, 0);
  4847. SaveVehicle(i);
  4848. format(msg, sizeof(msg), "Added vehicle id %d to dealerid %d", i, dealerid);
  4849. SendClientMessage(playerid, COLOR_WHITE, msg);
  4850. return 1;
  4851. }
  4852. }
  4853. SendClientMessage(playerid, COLOR_RED, "Can't add any more vehicles!");
  4854. return 1;
  4855. }
  4856.  
  4857. CMD:editv(playerid, params[])
  4858. {
  4859. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4860. if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  4861. {
  4862. new id = GetVehicleID(GetPlayerVehicleID(playerid));
  4863. if(!IsValidVehicle(id)) return SendClientMessage(playerid, COLOR_RED, "This is not a dynamic vehicle!");
  4864. SetPVarInt(playerid, "DialogValue1", id);
  4865. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  4866. return 1;
  4867. }
  4868. new vehicleid;
  4869. if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /editv [vehicleid]");
  4870. if(!IsValidVehicle(vehicleid)) return SendClientMessage(playerid, COLOR_RED, "Invalid vehicleid!");
  4871. SetPVarInt(playerid, "DialogValue1", vehicleid);
  4872. ShowDialog(playerid, DIALOG_EDITVEHICLE);
  4873. return 1;
  4874. }
  4875.  
  4876. CMD:adddealership(playerid, params[])
  4877. {
  4878. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4879. if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_RED, "You can't use this command now!");
  4880. for(new i=1; i < MAX_DEALERSHIPS; i++)
  4881. {
  4882. if(!DealershipCreated[i])
  4883. {
  4884. new msg[128];
  4885. DealershipCreated[i] = 1;
  4886. GetPlayerPos(playerid, DealershipPos[i][0], DealershipPos[i][1], DealershipPos[i][2]);
  4887. UpdateDealership(i, 0);
  4888. SaveDealership(i);
  4889. format(msg, sizeof(msg), "Added dealership id %d", i);
  4890. SendClientMessage(playerid, COLOR_WHITE, msg);
  4891. return 1;
  4892. }
  4893. }
  4894. SendClientMessage(playerid, COLOR_RED, "Can't add any more dealerships!");
  4895. return 1;
  4896. }
  4897.  
  4898. CMD:deletedealership(playerid, params[])
  4899. {
  4900. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4901. new dealerid, msg[128];
  4902. if(sscanf(params, "d", dealerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /deletedealership [dealerid]");
  4903. if(!IsValidDealership(dealerid)) return SendClientMessage(playerid, COLOR_RED, "Invalid dealerid!");
  4904. for(new i=1; i < MAX_DVEHICLES; i++)
  4905. {
  4906. if(VehicleCreated[i] == VEHICLE_DEALERSHIP && strval(VehicleOwner[i]) == dealerid)
  4907. {
  4908. DestroyVehicle(VehicleID[i]);
  4909. Delete3DTextLabel(VehicleLabel[i]);
  4910. VehicleCreated[i] = 0;
  4911. }
  4912. }
  4913. DealershipCreated[dealerid] = 0;
  4914. Delete3DTextLabel(DealershipLabel[dealerid]);
  4915. SaveDealership(dealerid);
  4916. format(msg, sizeof(msg), "Deleted dealership id %d", dealerid);
  4917. SendClientMessage(playerid, COLOR_WHITE, msg);
  4918. return 1;
  4919. }
  4920.  
  4921. CMD:movedealership(playerid, params[])
  4922. {
  4923. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4924. new dealerid, msg[128];
  4925. if(sscanf(params, "d", dealerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /movedealership [dealerid]");
  4926. if(!IsValidDealership(dealerid)) return SendClientMessage(playerid, COLOR_RED, "Invalid dealerid!");
  4927. GetPlayerPos(playerid, DealershipPos[dealerid][0], DealershipPos[dealerid][1], DealershipPos[dealerid][2]);
  4928. UpdateDealership(dealerid, 1);
  4929. SaveDealership(dealerid);
  4930. format(msg, sizeof(msg), "Moved dealership id %d here", dealerid);
  4931. SendClientMessage(playerid, COLOR_WHITE, msg);
  4932. return 1;
  4933. }
  4934.  
  4935. CMD:gotodealership(playerid, params[])
  4936. {
  4937. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4938. new dealerid, msg[128];
  4939. if(sscanf(params, "d", dealerid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /gotodealership [dealerid]");
  4940. if(!IsValidDealership(dealerid)) return SendClientMessage(playerid, COLOR_RED, "Invalid dealerid!");
  4941. SetPlayerPos(playerid, DealershipPos[dealerid][0], DealershipPos[dealerid][1], DealershipPos[dealerid][2]);
  4942. format(msg, sizeof(msg), "Teleported to dealership id %d", dealerid);
  4943. SendClientMessage(playerid, COLOR_WHITE, msg);
  4944. return 1;
  4945. }
  4946.  
  4947. CMD:addfuelstation(playerid, params[])
  4948. {
  4949. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4950. if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_RED, "You can't use this command now!");
  4951. for(new i=1; i < MAX_FUEL_STATIONS; i++)
  4952. {
  4953. if(!FuelStationCreated[i])
  4954. {
  4955. new msg[128];
  4956. FuelStationCreated[i] = 1;
  4957. GetPlayerPos(playerid, FuelStationPos[i][0], FuelStationPos[i][1], FuelStationPos[i][2]);
  4958. UpdateFuelStation(i, 0);
  4959. SaveFuelStation(i);
  4960. format(msg, sizeof(msg), "Added fuel station id %d", i);
  4961. SendClientMessage(playerid, COLOR_WHITE, msg);
  4962. return 1;
  4963. }
  4964. }
  4965. SendClientMessage(playerid, COLOR_RED, "Can't add any more fuel stations!");
  4966. return 1;
  4967. }
  4968.  
  4969. CMD:deletefuelstation(playerid, params[])
  4970. {
  4971. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4972. new stationid, msg[128];
  4973. if(sscanf(params, "d", stationid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /deletefuelstation [stationid]");
  4974. if(!IsValidFuelStation(stationid)) return SendClientMessage(playerid, COLOR_RED, "Invalid stationid!");
  4975. FuelStationCreated[stationid] = 0;
  4976. Delete3DTextLabel(FuelStationLabel[stationid]);
  4977. SaveFuelStation(stationid);
  4978. format(msg, sizeof(msg), "Deleted fuel station id %d", stationid);
  4979. SendClientMessage(playerid, COLOR_WHITE, msg);
  4980. return 1;
  4981. }
  4982.  
  4983. CMD:movefuelstation(playerid, params[])
  4984. {
  4985. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  4986. new stationid, msg[128];
  4987. if(sscanf(params, "d", stationid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /movefuelstation [stationid]");
  4988. if(!IsValidFuelStation(stationid)) return SendClientMessage(playerid, COLOR_RED, "Invalid stationid!");
  4989. GetPlayerPos(playerid, FuelStationPos[stationid][0], FuelStationPos[stationid][1], FuelStationPos[stationid][2]);
  4990. UpdateFuelStation(stationid, 1);
  4991. SaveFuelStation(stationid);
  4992. format(msg, sizeof(msg), "Moved fuel station id %d here", stationid);
  4993. SendClientMessage(playerid, COLOR_WHITE, msg);
  4994. return 1;
  4995. }
  4996.  
  4997. CMD:gotofuelstation(playerid, params[])
  4998. {
  4999. if(PlayerInfo[playerid][pAdmin] < 1338) return SendClientMessage(playerid, COLOR_RED, "You are not admin!");
  5000. new stationid, msg[128];
  5001. if(sscanf(params, "d", stationid)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /gotofuelstation [stationid]");
  5002. if(!IsValidFuelStation(stationid)) return SendClientMessage(playerid, COLOR_RED, "Invalid stationid!");
  5003. SetPlayerPos(playerid, FuelStationPos[stationid][0], FuelStationPos[stationid][1], FuelStationPos[stationid][2]);
  5004. format(msg, sizeof(msg), "Teleported to fuel station id %d", stationid);
  5005. SendClientMessage(playerid, COLOR_WHITE, msg);
  5006. return 1;
  5007. }
  5008. CMD:anims(playerid, params[])
  5009. {
  5010. SendClientMessage(playerid,COLOR_GRAD2," ____________Character Animations____________");
  5011. SendClientMessage(playerid,COLOR_GRAD2,"[Sit/Lay] /sit /seat /lay /sleep /lean /lean2");
  5012. SendClientMessage(playerid,COLOR_GRAD2,"[Signs] /gsign1 /gsign2 /gsign4 /gsign5 /gsign7");
  5013. SendClientMessage(playerid,COLOR_GRAD2,"[Communication] /greet1 /greet2 /greet3 ");
  5014. SendClientMessage(playerid,COLOR_GRAD2,"[Communication] /fuckyou /wave /argue /kiss");
  5015. SendClientMessage(playerid,COLOR_GRAD2,"[Physical Actions] /bat /bat2 /punch /aim /slapass");
  5016. SendClientMessage(playerid,COLOR_GRAD2,"[Physical Actions] /taxiL /flip /crack");
  5017. SendClientMessage(playerid,COLOR_GRAD2,"[Emotions] /injured");
  5018. SendClientMessage(playerid,COLOR_GRAD2,"_____________________________________________");
  5019. return true;
  5020. }
  5021. //================================ANIMATIONS====================================
  5022. CMD:taxiL(playerid, params[])
  5023. {
  5024. LoopingAnim(playerid,"PED","IDLE_taxi",4.0,0,1,1,1,0);
  5025. return 1;
  5026. }
  5027. CMD:punch(playerid, params[])
  5028. {
  5029. LoopingAnim(playerid,"MD_CHASE","MD_BIKE_Punch",4.0,0,1,1,1,0);
  5030. return 1;
  5031. }
  5032. CMD:greet1(playerid, params[])
  5033. {
  5034. LoopingAnim(playerid,"WUZI","Wuzi_Greet_Plyr",4.0,0,1,1,1,0);
  5035. return 1;
  5036. }
  5037. CMD:greet2(playerid, params[])
  5038. {
  5039. LoopingAnim(playerid,"WUZI","Wuzi_Greet_Wuzi",4.0,0,1,1,1,0);
  5040. return 1;
  5041. }
  5042. CMD:wave(playerid, params[])
  5043. {
  5044. LoopingAnim(playerid,"BD_FIRE ","BD_GF_Wave",4.0,0,1,1,1,0);
  5045. return 1;
  5046. }
  5047. CMD:argue(playerid, params[])
  5048. {
  5049. LoopingAnim(playerid,"PAULNMAC","PnM_Argue1_A",4.0,0,1,1,1,0);
  5050. return 1;
  5051. }
  5052. CMD:sleep(playerid, params[])
  5053. {
  5054. LoopingAnim(playerid,"INT_HOUSE","BED_In_L",4.0,0,1,1,1,0);
  5055. return 1;
  5056. }
  5057. CMD:lean2(playerid, params[])
  5058. {
  5059. LoopingAnim(playerid,"RYDER","Van_Lean_L",4.0,0,1,1,1,0);
  5060. return 1;
  5061. }
  5062.  
  5063. CMD:gsign1(playerid, params[])
  5064. {
  5065. LoopingAnim(playerid,"GHANDS","gsign1",4.0,0,1,1,1,0);
  5066. return 1;
  5067. }
  5068. CMD:gsign2(playerid, params[])
  5069. {
  5070. LoopingAnim(playerid,"GHANDS","gsign1LH",4.0,0,1,1,1,0);
  5071. return 1;
  5072. }
  5073. CMD:gsign3(playerid, params[])
  5074. {
  5075. LoopingAnim(playerid,"GHANDS","gsign2",4.0,0,1,1,1,0);
  5076. return 1;
  5077. }
  5078. CMD:gsign4(playerid, params[])
  5079. {
  5080. LoopingAnim(playerid,"GHANDS","gsign2LH",4.0,0,1,1,1,0);
  5081. return 1;
  5082. }
  5083. CMD:gsign5(playerid, params[])
  5084. {
  5085. LoopingAnim(playerid,"GHANDS","gsign3",4.0,0,1,1,1,0);
  5086. return 1;
  5087. }
  5088. CMD:gsign6(playerid, params[])
  5089. {
  5090. LoopingAnim(playerid,"GHANDS","gsign3LH",4.0,0,1,1,1,0);
  5091. return 1;
  5092. }
  5093. CMD:gsign7(playerid, params[])
  5094. {
  5095. LoopingAnim(playerid,"GHANDS","gsign4",4.0,0,1,1,1,0);
  5096. return 1;
  5097. }
  5098.  
  5099.  
  5100.  
  5101. CMD:carjacked1(playerid, params[])
  5102. {
  5103. LoopingAnim(playerid,"PED","CAR_jackedLHS",4.0,0,1,1,1,0);
  5104. return 1;
  5105. }
  5106.  
  5107.  
  5108.  
  5109. CMD:carjacked2(playerid, params[])
  5110. {
  5111. LoopingAnim(playerid,"PED","CAR_jackedRHS",4.0,0,1,1,1,0);
  5112. return 1;
  5113. }
  5114.  
  5115.  
  5116.  
  5117. CMD:handsup(playerid, params[])
  5118. {
  5119. LoopingAnim(playerid, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0);
  5120. return 1;
  5121. }
  5122.  
  5123.  
  5124.  
  5125. CMD:cellin(playerid, params[])
  5126. {
  5127. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USECELLPHONE);
  5128. return 1;
  5129. }
  5130.  
  5131.  
  5132.  
  5133. CMD:cellout(playerid, params[])
  5134. {
  5135. SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
  5136. return 1;
  5137. }
  5138.  
  5139.  
  5140.  
  5141. CMD:drunk(playerid, params[])
  5142. {
  5143. LoopingAnim(playerid,"PED","WALK_DRUNK",4.1,1,1,1,1,1);
  5144. return 1;
  5145. }
  5146.  
  5147.  
  5148.  
  5149. CMD:bomb(playerid, params[])
  5150. {
  5151. ClearAnimations(playerid);
  5152. LoopingAnim(playerid, "BOMBER","BOM_Plant_Loop",4.0,1,0,0,1,0); // Place Bomb
  5153. return 1;
  5154. }
  5155.  
  5156.  
  5157. CMD:getarrested(playerid, params[])
  5158. {
  5159. LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); // Gun Arrest
  5160. return 1;
  5161. }
  5162.  
  5163.  
  5164. CMD:laugh(playerid, params[])
  5165. {
  5166. OnePlayAnim(playerid, "RAPPING", "Laugh_01", 4.0, 0, 0, 0, 0, 0); // Laugh
  5167. return 1;
  5168. }
  5169.  
  5170.  
  5171. CMD:lookout(playerid, params[])
  5172. {
  5173. OnePlayAnim(playerid, "SHOP", "ROB_Shifty", 4.0, 0, 0, 0, 0, 0); // Rob Lookout
  5174. return 1;
  5175. }
  5176.  
  5177.  
  5178. CMD:robman(playerid, params[])
  5179. {
  5180. LoopingAnim(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0); // Rob
  5181. return 1;
  5182. }
  5183.  
  5184.  
  5185. CMD:crossarms(playerid, params[])
  5186. {
  5187. LoopingAnim(playerid, "COP_AMBIENT", "Coplook_loop", 4.0, 0, 1, 1, 1, -1); // Arms crossed
  5188. return 1;
  5189. }
  5190.  
  5191.  
  5192. CMD:lay(playerid, params[])
  5193. {
  5194. LoopingAnim(playerid,"BEACH", "bather", 4.0, 1, 0, 0, 0, 0); // Lay down
  5195. return 1;
  5196. }
  5197.  
  5198.  
  5199. CMD:hide(playerid, params[])
  5200. {
  5201. LoopingAnim(playerid, "ped", "cower", 3.0, 1, 0, 0, 0, 0); // Taking Cover
  5202. return 1;
  5203. }
  5204.  
  5205.  
  5206. CMD:vomit(playerid, params[])
  5207. {
  5208. OnePlayAnim(playerid, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 0); // Vomit BAH!
  5209. return 1;
  5210. }
  5211.  
  5212.  
  5213. CMD:eat(playerid, params[])
  5214. {
  5215. OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0); // Eat Burger
  5216. return 1;
  5217. }
  5218. // Wave
  5219.  
  5220.  
  5221.  
  5222. CMD:slapass(playerid, params[])
  5223. {
  5224. OnePlayAnim(playerid, "SWEET", "sweet_ass_slap", 4.0, 0, 0, 0, 0, 0); // Ass Slapping
  5225. return 1;
  5226. }
  5227.  
  5228.  
  5229. CMD:deal(playerid, params[])
  5230. {
  5231. OnePlayAnim(playerid, "DEALER", "DEALER_DEAL", 4.0, 0, 0, 0, 0, 0); // Deal Drugs
  5232. return 1;
  5233. }
  5234.  
  5235.  
  5236.  
  5237. CMD:crack(playerid, params[])
  5238. {
  5239. LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0); // Dieing of Crack
  5240. return 1;
  5241. }
  5242.  
  5243. // Sit
  5244. CMD:sit(playerid, params[])
  5245. {
  5246. LoopingAnim(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 0, 0, 0); // Sit
  5247. return 1;
  5248. }
  5249. // Idle Chat
  5250. CMD:chat(playerid, params[])
  5251. {
  5252. LoopingAnim(playerid,"PED","IDLE_CHAT",4.0,1,0,0,1,1);
  5253. return 1;
  5254. }
  5255. // Idle Chat2
  5256. CMD:chat2(playerid, params[])
  5257. {
  5258. LoopingAnim(playerid,"MISC","Idle_Chat_02",4.0,1,0,0,1,1);
  5259. return 1;
  5260. }
  5261. // Fucku
  5262. CMD:fuckyou(playerid, params[])
  5263. {
  5264. OnePlayAnim(playerid,"PED","fucku",4.0,0,0,0,0,0);
  5265. return 1;
  5266. }
  5267. // TaiChi
  5268. CMD:taichi(playerid, params[])
  5269. {
  5270. LoopingAnim(playerid,"PARK","Tai_Chi_Loop",4.0,1,0,0,0,0);
  5271. return 1;
  5272. }
  5273.  
  5274. // ChairSit
  5275.  
  5276. // Fall on the ground
  5277. CMD:flip(playerid, params[])
  5278. {
  5279. LoopingAnim(playerid,"PED","KO_skid_front",4.1,0,1,1,1,0);
  5280. return 1;
  5281. }
  5282.  
  5283. // Fall
  5284. CMD:backflip(playerid, params[])
  5285. {
  5286. LoopingAnim(playerid, "PED","FLOOR_hit_f", 4.0, 1, 0, 0, 0, 0);
  5287. return 1;
  5288. }
  5289.  
  5290. // kiss
  5291. CMD:kiss(playerid, params[])
  5292. {
  5293. LoopingAnim(playerid, "KISSING", "Playa_Kiss_02", 3.0, 1, 1, 1, 1, 0);
  5294. return 1;
  5295. }
  5296.  
  5297. // Injujred
  5298. CMD:injured(playerid, params[])
  5299. {
  5300. LoopingAnim(playerid, "SWEET", "Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
  5301. return 1;
  5302. }
  5303.  
  5304.  
  5305. // Violence animations
  5306. CMD:push(playerid, params[])
  5307. {
  5308. OnePlayAnim(playerid,"GANGS","shake_cara",4.0,0,0,0,0,0);
  5309. return 1;
  5310. }
  5311.  
  5312. CMD:akick(playerid, params[])
  5313. {
  5314. OnePlayAnim(playerid,"POLICE","Door_Kick",4.0,0,0,0,0,0);
  5315. return 1;
  5316. }
  5317.  
  5318. CMD:lowbodypush(playerid, params[])
  5319. {
  5320. OnePlayAnim(playerid,"GANGS","shake_carSH",4.0,0,0,0,0,0);
  5321. return 1;
  5322. }
  5323.  
  5324. // Spray
  5325. CMD:spray(playerid, params[])
  5326. {
  5327. OnePlayAnim(playerid,"SPRAYCAN","spraycan_full",4.0,0,0,0,0,0);
  5328. return 1;
  5329. }
  5330.  
  5331. // Headbutt
  5332. CMD:headbutt(playerid, params[])
  5333. {
  5334. OnePlayAnim(playerid,"WAYFARER","WF_Fwd",4.0,0,0,0,0,0);
  5335. return 1;
  5336. }
  5337.  
  5338. // Medic
  5339. CMD:medic(playerid, params[])
  5340. {
  5341. OnePlayAnim(playerid,"MEDIC","CPR",4.0,0,0,0,0,0);
  5342. return 1;
  5343. }
  5344.  
  5345. // KO Face
  5346. CMD:koface(playerid, params[])
  5347. {
  5348. LoopingAnim(playerid,"PED","KO_shot_face",4.0,0,1,1,1,0);
  5349. return 1;
  5350. }
  5351.  
  5352. // KO Stomach
  5353. CMD:kostomach(playerid, params[])
  5354. {
  5355. LoopingAnim(playerid,"PED","KO_shot_stom",4.0,0,1,1,1,0);
  5356. return 1;
  5357. }
  5358.  
  5359. // Jump for your life!
  5360. CMD:lifejump(playerid, params[])
  5361. {
  5362. LoopingAnim(playerid,"PED","EV_dive",4.0,0,1,1,1,0);
  5363. return 1;
  5364. }
  5365.  
  5366. // Exhausted
  5367. CMD:exhaust(playerid, params[])
  5368. {
  5369. LoopingAnim(playerid,"PED","IDLE_tired",3.0,1,0,0,0,0);
  5370. return 1;
  5371. }
  5372.  
  5373. // Left big slap
  5374. CMD:leftslap(playerid, params[])
  5375. {
  5376. OnePlayAnim(playerid,"PED","BIKE_elbowL",4.0,0,0,0,0,0);
  5377. return 1;
  5378. }
  5379.  
  5380. // Big fall
  5381. CMD:rollfall(playerid, params[])
  5382. {
  5383. LoopingAnim(playerid,"PED","BIKE_fallR",4.0,0,1,1,1,0);
  5384. return 1;
  5385. }
  5386.  
  5387. // Locked
  5388. CMD:carlock(playerid, params[])
  5389. {
  5390. OnePlayAnim(playerid,"PED","CAR_doorlocked_LHS",4.0,0,0,0,0,0);
  5391. return 1;
  5392. }
  5393.  
  5394. // carjack
  5395. CMD:rcarjack1(playerid, params[])
  5396. {
  5397. OnePlayAnim(playerid,"PED","CAR_pulloutL_LHS",4.0,0,0,0,0,0);
  5398. return 1;
  5399. }
  5400.  
  5401. // carjack
  5402. CMD:lcarjack1(playerid, params[])
  5403. {
  5404. OnePlayAnim(playerid,"PED","CAR_pulloutL_RHS",4.0,0,0,0,0,0);
  5405. return 1;
  5406. }
  5407.  
  5408. // carjack
  5409. CMD:rcarjack2(playerid, params[])
  5410. {
  5411. OnePlayAnim(playerid,"PED","CAR_pullout_LHS",4.0,0,0,0,0,0);
  5412. return 1;
  5413. }
  5414.  
  5415. // carjack
  5416. CMD:lcarjack2(playerid, params[])
  5417. {
  5418. OnePlayAnim(playerid,"PED","CAR_pullout_RHS",4.0,0,0,0,0,0);
  5419. return 1;
  5420. }
  5421.  
  5422. // Hood frisked
  5423. CMD:hoodfrisked(playerid, params[])
  5424. {
  5425. LoopingAnim(playerid,"POLICE","crm_drgbst_01",4.0,0,1,1,1,0);
  5426. return 1;
  5427. }
  5428.  
  5429. // Lighting cigarette
  5430. CMD:lightcig(playerid, params[])
  5431. {
  5432. OnePlayAnim(playerid,"SMOKING","M_smk_in",3.0,0,0,0,0,0);
  5433. return 1;
  5434. }
  5435.  
  5436. // Tap cigarette
  5437. CMD:tapcig(playerid, params[])
  5438. {
  5439. OnePlayAnim(playerid,"SMOKING","M_smk_tap",3.0,0,0,0,0,0);
  5440. return 1;
  5441. }
  5442.  
  5443. // Bat stance
  5444. CMD:bat(playerid, params[])
  5445. {
  5446. LoopingAnim(playerid,"BASEBALL","Bat_IDLE",4.0,1,1,1,1,0);
  5447. return 1;
  5448. }
  5449.  
  5450. // Boxing
  5451. CMD:box(playerid, params[])
  5452. {
  5453. LoopingAnim(playerid,"GYMNASIUM","GYMshadowbox",4.0,1,1,1,1,0);
  5454. return 1;
  5455. }
  5456.  
  5457. // Lay 2
  5458. CMD:lay2(playerid, params[])
  5459. {
  5460. LoopingAnim(playerid,"SUNBATHE","Lay_Bac_in",3.0,0,1,1,1,0);
  5461. return 1;
  5462. }
  5463.  
  5464.  
  5465.  
  5466. CMD:chant(playerid, params[])
  5467. {
  5468. LoopingAnim(playerid,"RIOT","RIOT_CHANT",4.0,1,1,1,1,0);
  5469. return 1;
  5470. }
  5471.  
  5472.  
  5473.  
  5474. CMD:fucku(playerid, params[])
  5475. {
  5476. OnePlayAnim(playerid,"RIOT","RIOT_FUKU",2.0,0,0,0,0,0);
  5477. return 1;
  5478. }
  5479.  
  5480.  
  5481.  
  5482. CMD:shouting(playerid, params[])
  5483. {
  5484. LoopingAnim(playerid,"RIOT","RIOT_shout",4.0,1,0,0,0,0);
  5485. return 1;
  5486. }
  5487.  
  5488.  
  5489.  
  5490. CMD:cop(playerid, params[])
  5491. {
  5492. OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
  5493. return 1;
  5494. }
  5495.  
  5496.  
  5497.  
  5498. CMD:elbow(playerid, params[])
  5499. {
  5500. OnePlayAnim(playerid,"FIGHT_D","FightD_3",4.0,0,1,1,0,0);
  5501. return 1;
  5502. }
  5503.  
  5504.  
  5505.  
  5506. CMD:kneekick(playerid, params[])
  5507. {
  5508. OnePlayAnim(playerid,"FIGHT_D","FightD_2",4.0,0,1,1,0,0);
  5509. return 1;
  5510. }
  5511.  
  5512.  
  5513.  
  5514. CMD:fstance(playerid, params[])
  5515. {
  5516. LoopingAnim(playerid,"FIGHT_D","FightD_IDLE",4.0,1,1,1,1,0);
  5517. return 1;
  5518. }
  5519. //==============================================================================
  5520. CMD:engine(playerid, params[])
  5521. {
  5522. new vehicleid = GetPlayerVehicleID(playerid);
  5523. if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, "You need to be in a vehicle to use this command");
  5524. if(vehEngine[vehicleid] == 0)
  5525. {
  5526. vehEngine[vehicleid] = 2;
  5527. SetTimerEx("StartEngine", 3000, 0, "i", playerid);
  5528. SendClientMessage(playerid, COLOR_GREEN, "Vehicle engine starting");
  5529. }
  5530. else if(vehEngine[vehicleid] == 1)
  5531. {
  5532. vehEngine[vehicleid] = 0;
  5533. TogglePlayerControllable(playerid, 0);
  5534. SendClientMessage(playerid, COLOR_GOLD, "Vehicle engine stopped");
  5535. SendClientMessage(playerid, COLOR_GOLD, "To re-start the vehicle's engine press \"Shift\" or type \"/engine\"");
  5536. }
  5537. return 1;
  5538. }
  5539.  
  5540. //======================================================[STOCKS]========================================================================
  5541. stock IsVehicleOccupied(vehicleid)
  5542. {
  5543. for(new i=0;i<MAX_PLAYERS;i++)
  5544. {
  5545. if(IsPlayerInVehicle(i,vehicleid)) return 1;
  5546. }
  5547. return 0;
  5548. }
  5549. //=====================================================[SERVERSIDE CASH FUNCTIONS=============================================
  5550. stock GivePlayerCash(playerid, money)
  5551. {
  5552. PlayerInfo[playerid][pCash] += money;
  5553. ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
  5554. UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
  5555. return PlayerInfo[playerid][pCash];
  5556. }
  5557. stock SetPlayerCash(playerid, money)
  5558. {
  5559. PlayerInfo[playerid][pCash] = money;
  5560. ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
  5561. UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
  5562. return PlayerInfo[playerid][pCash];
  5563. }
  5564. stock ResetPlayerCash(playerid)
  5565. {
  5566. PlayerInfo[playerid][pCash] = 0;
  5567. ResetMoneyBar(playerid);//Resets the money in the original moneybar, Do not remove!
  5568. UpdateMoneyBar(playerid,PlayerInfo[playerid][pCash]);//Sets the money in the moneybar to the serverside cash, Do not remove!
  5569. return PlayerInfo[playerid][pCash];
  5570. }
  5571. stock GetPlayerCash(playerid)
  5572. {
  5573. return PlayerInfo[playerid][pCash];
  5574. }
  5575. //===============================================================================================================================
  5576.  
  5577. stock sscanf(string[], format[], {Float,_}:...)
  5578. {
  5579. #if defined isnull
  5580. if (isnull(string))
  5581. #else
  5582. if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  5583. #endif
  5584. {
  5585. return format[0];
  5586. }
  5587. #pragma tabsize 4
  5588. new
  5589. formatPos = 0,
  5590. stringPos = 0,
  5591. paramPos = 2,
  5592. paramCount = numargs(),
  5593. delim = ' ';
  5594. while (string[stringPos] && string[stringPos] <= ' ')
  5595. {
  5596. stringPos++;
  5597. }
  5598. while (paramPos < paramCount && string[stringPos])
  5599. {
  5600. switch (format[formatPos++])
  5601. {
  5602. case '\0':
  5603. {
  5604. return 0;
  5605. }
  5606. case 'i', 'd':
  5607. {
  5608. new
  5609. neg = 1,
  5610. num = 0,
  5611. ch = string[stringPos];
  5612. if (ch == '-')
  5613. {
  5614. neg = -1;
  5615. ch = string[++stringPos];
  5616. }
  5617. do
  5618. {
  5619. stringPos++;
  5620. if ('0' <= ch <= '9')
  5621. {
  5622. num = (num * 10) + (ch - '0');
  5623. }
  5624. else
  5625. {
  5626. return -1;
  5627. }
  5628. }
  5629. while ((ch = string[stringPos]) > ' ' && ch != delim);
  5630. setarg(paramPos, 0, num * neg);
  5631. }
  5632. case 'h', 'x':
  5633. {
  5634. new
  5635. num = 0,
  5636. ch = string[stringPos];
  5637. do
  5638. {
  5639. stringPos++;
  5640. switch (ch)
  5641. {
  5642. case 'x', 'X':
  5643. {
  5644. num = 0;
  5645. continue;
  5646. }
  5647. case '0' .. '9':
  5648. {
  5649. num = (num << 4) | (ch - '0');
  5650. }
  5651. case 'a' .. 'f':
  5652. {
  5653. num = (num << 4) | (ch - ('a' - 10));
  5654. }
  5655. case 'A' .. 'F':
  5656. {
  5657. num = (num << 4) | (ch - ('A' - 10));
  5658. }
  5659. default:
  5660. {
  5661. return -1;
  5662. }
  5663. }
  5664. }
  5665. while ((ch = string[stringPos]) > ' ' && ch != delim);
  5666. setarg(paramPos, 0, num);
  5667. }
  5668. case 'c':
  5669. {
  5670. setarg(paramPos, 0, string[stringPos++]);
  5671. }
  5672. case 'f':
  5673. {
  5674.  
  5675. new changestr[16], changepos = 0, strpos = stringPos;
  5676. while(changepos < 16 && string[strpos] && string[strpos] != delim)
  5677. {
  5678. changestr[changepos++] = string[strpos++];
  5679. }
  5680. changestr[changepos] = '\0';
  5681. setarg(paramPos,0,_:floatstr(changestr));
  5682. }
  5683. case 'p':
  5684. {
  5685. delim = format[formatPos++];
  5686. continue;
  5687. }
  5688. case '\'':
  5689. {
  5690. new
  5691. end = formatPos - 1,
  5692. ch;
  5693. while ((ch = format[++end]) && ch != '\'') {}
  5694. if (!ch)
  5695. {
  5696. return -1;
  5697. }
  5698. format[end] = '\0';
  5699. if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  5700. {
  5701. if (format[end + 1])
  5702. {
  5703. return -1;
  5704. }
  5705. return 0;
  5706. }
  5707. format[end] = '\'';
  5708. stringPos = ch + (end - formatPos);
  5709. formatPos = end + 1;
  5710. }
  5711. case 'u':
  5712. {
  5713. new
  5714. end = stringPos - 1,
  5715. id = 0,
  5716. bool:num = true,
  5717. ch;
  5718. while ((ch = string[++end]) && ch != delim)
  5719. {
  5720. if (num)
  5721. {
  5722. if ('0' <= ch <= '9')
  5723. {
  5724. id = (id * 10) + (ch - '0');
  5725. }
  5726. else
  5727. {
  5728. num = false;
  5729. }
  5730. }
  5731. }
  5732. if (num && IsPlayerConnected(id))
  5733. {
  5734. setarg(paramPos, 0, id);
  5735. }
  5736. else
  5737. {
  5738. #if !defined foreach
  5739. #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  5740. #define __SSCANF_FOREACH__
  5741. #endif
  5742. string[end] = '\0';
  5743. num = false;
  5744. new
  5745. name[MAX_PLAYER_NAME];
  5746. id = end - stringPos;
  5747. foreach (Player, playerid)
  5748. {
  5749. GetPlayerName(playerid, name, sizeof (name));
  5750. if (!strcmp(name, string[stringPos], true, id))
  5751. {
  5752. setarg(paramPos, 0, playerid);
  5753. num = true;
  5754. break;
  5755. }
  5756. }
  5757. if (!num)
  5758. {
  5759. setarg(paramPos, 0, INVALID_PLAYER_ID);
  5760. }
  5761. string[end] = ch;
  5762. #if defined __SSCANF_FOREACH__
  5763. #undef foreach
  5764. #undef __SSCANF_FOREACH__
  5765. #endif
  5766. }
  5767. stringPos = end;
  5768. }
  5769. case 's', 'z':
  5770. {
  5771. new
  5772. i = 0,
  5773. ch;
  5774. if (format[formatPos])
  5775. {
  5776. while ((ch = string[stringPos++]) && ch != delim)
  5777. {
  5778. setarg(paramPos, i++, ch);
  5779. }
  5780. if (!i)
  5781. {
  5782. return -1;
  5783. }
  5784. }
  5785. else
  5786. {
  5787. while ((ch = string[stringPos++]))
  5788. {
  5789. setarg(paramPos, i++, ch);
  5790. }
  5791. }
  5792. stringPos--;
  5793. setarg(paramPos, i, '\0');
  5794. }
  5795. default:
  5796. {
  5797. continue;
  5798. }
  5799. }
  5800. while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  5801. {
  5802. stringPos++;
  5803. }
  5804. while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  5805. {
  5806. stringPos++;
  5807. }
  5808. paramPos++;
  5809. }
  5810. do
  5811. {
  5812. if ((delim = format[formatPos++]) > ' ')
  5813. {
  5814. if (delim == '\'')
  5815. {
  5816. while ((delim = format[formatPos++]) && delim != '\'') {}
  5817. }
  5818. else if (delim != 'z')
  5819. {
  5820. return delim;
  5821. }
  5822. }
  5823. }
  5824. while (delim > ' ');
  5825. return 0;
  5826. }
  5827.  
  5828. stock strvalEx( const string[] ) // fix for strval-bug with > 50 letters.
  5829. {
  5830. // written by mabako in less than a minute :X
  5831. if( strlen( string ) >= 50 ) return 0; // It will just return 0 if the string is too long
  5832. return strval(string);
  5833. }
  5834. stock IsValidName(playerid)
  5835. {
  5836. if (IsPlayerConnected(playerid))
  5837. {
  5838. new player[24];
  5839. GetPlayerName(playerid,player,24);
  5840. for(new n = 0; n < strlen(player); n++)
  5841. {
  5842. if (player[n] == '_' && player[n+1] >= 'A' && player[n+1] <= 'Z') return 1;
  5843. if (player[n] == ']' || player[n] == '[') return 0;
  5844. }
  5845. }
  5846. return 0;
  5847. }
  5848. //=============================DEALERSHIP======================================
  5849. stock IsPlayerSpawned(playerid)
  5850. {
  5851. switch(GetPlayerState(playerid))
  5852. {
  5853. case 1,2,3: return 1;
  5854. }
  5855. return 0;
  5856. }
  5857.  
  5858. stock IsMeleeWeapon(weaponid)
  5859. {
  5860. switch(weaponid)
  5861. {
  5862. case 2 .. 15, 41 .. 42: return 1;
  5863. }
  5864. return 0;
  5865. }
  5866.  
  5867. stock RemovePlayerWeapon(playerid, weaponid)
  5868. {
  5869. new WeaponData[12][2];
  5870. for(new i=1; i < sizeof(WeaponData); i++)
  5871. {
  5872. GetPlayerWeaponData(playerid, i, WeaponData[i][0], WeaponData[i][1]);
  5873. }
  5874. ResetPlayerWeapons(playerid);
  5875. for(new i=1; i < sizeof(WeaponData); i++)
  5876. {
  5877. if(WeaponData[i][0] != weaponid)
  5878. {
  5879. GivePlayerWeapon(playerid, WeaponData[i][0], WeaponData[i][1]);
  5880. }
  5881. }
  5882. }
  5883.  
  5884. stock IsBicycle(vehicleid)
  5885. {
  5886. switch(GetVehicleModel(vehicleid))
  5887. {
  5888. case 481,509,510: return 1;
  5889. }
  5890. return 0;
  5891. }
  5892.  
  5893. stock PlayerToPlayer(playerid, targetid, Float:dist)
  5894. {
  5895. new Float:pos[3];
  5896. GetPlayerPos(targetid, pos[0], pos[1], pos[2]);
  5897. return IsPlayerInRangeOfPoint(playerid, dist, pos[0], pos[1], pos[2]);
  5898. }
  5899.  
  5900. stock PlayerToVehicle(playerid, vehicleid, Float:dist)
  5901. {
  5902. new Float:pos[3];
  5903. GetVehiclePos(vehicleid, pos[0], pos[1], pos[2]);
  5904. return IsPlayerInRangeOfPoint(playerid, dist, pos[0], pos[1], pos[2]);
  5905. }
  5906.  
  5907. stock GetClosestVehicle(playerid)
  5908. {
  5909. new Float:x, Float:y, Float:z;
  5910. new Float:dist, Float:closedist=9999, closeveh;
  5911. for(new i=1; i < MAX_VEHICLES; i++)
  5912. {
  5913. if(GetVehiclePos(i, x, y, z))
  5914. {
  5915. dist = GetPlayerDistanceFromPoint(playerid, x, y, z);
  5916. if(dist < closedist)
  5917. {
  5918. closedist = dist;
  5919. closeveh = i;
  5920. }
  5921. }
  5922. }
  5923. return closeveh;
  5924. }
  5925.  
  5926. stock ToggleEngine(vehicleid, toggle)
  5927. {
  5928. new engine, lights, alarm, doors, bonnet, boot, objective;
  5929. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  5930. SetVehicleParamsEx(vehicleid, toggle, lights, alarm, doors, bonnet, boot, objective);
  5931. }
  5932.  
  5933. stock ToggleAlarm(vehicleid, toggle)
  5934. {
  5935. new engine, lights, alarm, doors, bonnet, boot, objective;
  5936. GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
  5937. SetVehicleParamsEx(vehicleid, engine, lights, toggle, doors, bonnet, boot, objective);
  5938. }
  5939.  
  5940. stock IsNumeric(const string[])
  5941. {
  5942. for(new i=0; string[i]; i++)
  5943. {
  5944. if(string[i] < '0' || string[i] > '9') return 0;
  5945. }
  5946. return 1;
  5947. }
  5948.  
  5949. stock GetVehicleModelIDFromName(const vname[])
  5950. {
  5951. for(new i=0; i < sizeof(VehicleNames); i++)
  5952. {
  5953. if(strfind(VehicleNames[i], vname, true) != -1) return i + 400;
  5954. }
  5955. return -1;
  5956. }
  5957.  
  5958. stock GetPlayer2DZone(playerid)
  5959. {
  5960. new zone[32] = "San Andreas";
  5961. new Float:x, Float:y, Float:z;
  5962. GetPlayerPos(playerid, x, y, z);
  5963. for(new i = 0; i < sizeof(SanAndreasZones); i++)
  5964. {
  5965. if(x >= SanAndreasZones[i][Zone_Area][0] && x <= SanAndreasZones[i][Zone_Area][3]
  5966. && y >= SanAndreasZones[i][Zone_Area][1] && y <= SanAndreasZones[i][Zone_Area][4])
  5967. {
  5968. strcpy(zone, sizeof(zone), SanAndreasZones[i][Zone_Name]);
  5969. return zone;
  5970. }
  5971. }
  5972. return zone;
  5973. }
  5974. stock GetPlayer3DZone(playerid)
  5975. {
  5976. new zone[32] = "San Andreas";
  5977. new Float:x, Float:y, Float:z;
  5978. GetPlayerPos(playerid, x, y, z);
  5979. for(new i = 0; i < sizeof(SanAndreasZones); i++)
  5980. {
  5981. if(x >= SanAndreasZones[i][Zone_Area][0] && x <= SanAndreasZones[i][Zone_Area][3]
  5982. && y >= SanAndreasZones[i][Zone_Area][1] && y <= SanAndreasZones[i][Zone_Area][4]
  5983. && z >= SanAndreasZones[i][Zone_Area][2] && z <= SanAndreasZones[i][Zone_Area][5])
  5984. {
  5985. strcpy(zone, sizeof(zone), SanAndreasZones[i][Zone_Name]);
  5986. return zone;
  5987. }
  5988. }
  5989. return zone;
  5990. }
  5991.  
  5992. LoadVehicles()
  5993. {
  5994. new File:handle, count;
  5995. new Filename[64], line[256];
  5996. for(new i=1; i < MAX_DVEHICLES; i++)
  5997. {
  5998. format(Filename, sizeof(Filename), VEHICLE_File_PATH "v%d.ini", i);
  5999. if(!fexist(Filename)) continue;
  6000. handle = fopen(Filename, io_read);
  6001. while(fread(handle, line))
  6002. {
  6003. StripNL(line);
  6004. if(!line[0]) continue;
  6005. if(strcmp(line, "Created=", false, 8) == 0) VehicleCreated[i] = strval(line[8]);
  6006. else if(strcmp(line, "Model=", false, 6) == 0) VehicleModel[i] = strval(line[6]);
  6007. else if(strcmp(line, "Pos=", false, 4) == 0) sscanf(line[4], "p,ffff", VehiclePos[i][0], VehiclePos[i][1],
  6008. VehiclePos[i][2], VehiclePos[i][3]);
  6009. else if(strcmp(line, "Colors=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleColor[i][0], VehicleColor[i][1]);
  6010. else if(strcmp(line, "Interior=", false, 9) == 0) VehicleInterior[i] = strval(line[9]);
  6011. else if(strcmp(line, "VirtualWorld=", false, 13) == 0) VehicleWorld[i] = strval(line[13]);
  6012. else if(strcmp(line, "Owner=", false, 6) == 0) strcpy(VehicleOwner[i], sizeof(VehicleOwner[]), line[6]);
  6013. else if(strcmp(line, "NumberPlate=", false, 12) == 0) strcpy(VehicleNumberPlate[i], sizeof(VehicleNumberPlate[]), line[12]);
  6014. else if(strcmp(line, "Value=", false, 6) == 0) VehicleValue[i] = strval(line[6]);
  6015. else if(strcmp(line, "Trunk1=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleTrunk[i][0][0], VehicleTrunk[i][0][1]);
  6016. else if(strcmp(line, "Trunk2=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleTrunk[i][1][0], VehicleTrunk[i][1][1]);
  6017. else if(strcmp(line, "Trunk3=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleTrunk[i][2][0], VehicleTrunk[i][2][1]);
  6018. else if(strcmp(line, "Trunk4=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleTrunk[i][3][0], VehicleTrunk[i][3][1]);
  6019. else if(strcmp(line, "Trunk5=", false, 7) == 0) sscanf(line[7], "p,dd", VehicleTrunk[i][4][0], VehicleTrunk[i][4][1]);
  6020. else if(strcmp(line, "Mod0=", false, 5) == 0) VehicleMods[i][0] = strval(line[5]);
  6021. else if(strcmp(line, "Mod1=", false, 5) == 0) VehicleMods[i][1] = strval(line[5]);
  6022. else if(strcmp(line, "Mod2=", false, 5) == 0) VehicleMods[i][2] = strval(line[5]);
  6023. else if(strcmp(line, "Mod3=", false, 5) == 0) VehicleMods[i][3] = strval(line[5]);
  6024. else if(strcmp(line, "Mod4=", false, 5) == 0) VehicleMods[i][4] = strval(line[5]);
  6025. else if(strcmp(line, "Mod5=", false, 5) == 0) VehicleMods[i][5] = strval(line[5]);
  6026. else if(strcmp(line, "Mod6=", false, 5) == 0) VehicleMods[i][6] = strval(line[5]);
  6027. else if(strcmp(line, "Mod7=", false, 5) == 0) VehicleMods[i][7] = strval(line[5]);
  6028. else if(strcmp(line, "Mod8=", false, 5) == 0) VehicleMods[i][8] = strval(line[5]);
  6029. else if(strcmp(line, "Mod9=", false, 5) == 0) VehicleMods[i][9] = strval(line[5]);
  6030. else if(strcmp(line, "Mod10=", false, 6) == 0) VehicleMods[i][10] = strval(line[6]);
  6031. else if(strcmp(line, "Mod11=", false, 6) == 0) VehicleMods[i][11] = strval(line[6]);
  6032. else if(strcmp(line, "Mod12=", false, 6) == 0) VehicleMods[i][12] = strval(line[6]);
  6033. else if(strcmp(line, "Mod13=", false, 6) == 0) VehicleMods[i][13] = strval(line[6]);
  6034. else if(strcmp(line, "Paintjob=", false, 9) == 0) VehiclePaintjob[i] = strval(line[9]);
  6035. }
  6036. fclose(handle);
  6037. if(VehicleCreated[i]) count++;
  6038. }
  6039. printf("------ Dealerships System Started------ ");
  6040. printf(" Loaded %d vehicles", count);
  6041. }
  6042.  
  6043. SaveVehicle(vehicleid)
  6044. {
  6045. new Filename[64], line[256];
  6046. format(Filename, sizeof(Filename), VEHICLE_File_PATH "v%d.ini", vehicleid);
  6047. new File:handle = fopen(Filename, io_write);
  6048. format(line, sizeof(line), "Created=%d\r\n", VehicleCreated[vehicleid]); fwrite(handle, line);
  6049. format(line, sizeof(line), "Model=%d\r\n", VehicleModel[vehicleid]); fwrite(handle, line);
  6050. format(line, sizeof(line), "Pos=%.3f,%.3f,%.3f,%.3f\r\n", VehiclePos[vehicleid][0], VehiclePos[vehicleid][1],
  6051. VehiclePos[vehicleid][2], VehiclePos[vehicleid][3]);
  6052. fwrite(handle, line);
  6053. format(line, sizeof(line), "Colors=%d,%d\r\n", VehicleColor[vehicleid][0], VehicleColor[vehicleid][1]); fwrite(handle, line);
  6054. format(line, sizeof(line), "Interior=%d\r\n", VehicleInterior[vehicleid]); fwrite(handle, line);
  6055. format(line, sizeof(line), "VirtualWorld=%d\r\n", VehicleWorld[vehicleid]); fwrite(handle, line);
  6056. format(line, sizeof(line), "Owner=%s\r\n", VehicleOwner[vehicleid]); fwrite(handle, line);
  6057. format(line, sizeof(line), "NumberPlate=%s\r\n", VehicleNumberPlate[vehicleid]); fwrite(handle, line);
  6058. format(line, sizeof(line), "Value=%d\r\n", VehicleValue[vehicleid]); fwrite(handle, line);
  6059. format(line, sizeof(line), "Trunk1=%d,%d\r\n", VehicleTrunk[vehicleid][0][0], VehicleTrunk[vehicleid][0][1]); fwrite(handle, line);
  6060. format(line, sizeof(line), "Trunk2=%d,%d\r\n", VehicleTrunk[vehicleid][1][0], VehicleTrunk[vehicleid][1][1]); fwrite(handle, line);
  6061. format(line, sizeof(line), "Trunk3=%d,%d\r\n", VehicleTrunk[vehicleid][2][0], VehicleTrunk[vehicleid][2][1]); fwrite(handle, line);
  6062. format(line, sizeof(line), "Trunk4=%d,%d\r\n", VehicleTrunk[vehicleid][3][0], VehicleTrunk[vehicleid][3][1]); fwrite(handle, line);
  6063. format(line, sizeof(line), "Trunk5=%d,%d\r\n", VehicleTrunk[vehicleid][4][0], VehicleTrunk[vehicleid][4][1]); fwrite(handle, line);
  6064. format(line, sizeof(line), "Mod0=%d\r\n", VehicleMods[vehicleid][0]); fwrite(handle, line);
  6065. format(line, sizeof(line), "Mod1=%d\r\n", VehicleMods[vehicleid][1]); fwrite(handle, line);
  6066. format(line, sizeof(line), "Mod2=%d\r\n", VehicleMods[vehicleid][2]); fwrite(handle, line);
  6067. format(line, sizeof(line), "Mod3=%d\r\n", VehicleMods[vehicleid][3]); fwrite(handle, line);
  6068. format(line, sizeof(line), "Mod4=%d\r\n", VehicleMods[vehicleid][4]); fwrite(handle, line);
  6069. format(line, sizeof(line), "Mod5=%d\r\n", VehicleMods[vehicleid][5]); fwrite(handle, line);
  6070. format(line, sizeof(line), "Mod6=%d\r\n", VehicleMods[vehicleid][6]); fwrite(handle, line);
  6071. format(line, sizeof(line), "Mod7=%d\r\n", VehicleMods[vehicleid][7]); fwrite(handle, line);
  6072. format(line, sizeof(line), "Mod8=%d\r\n", VehicleMods[vehicleid][8]); fwrite(handle, line);
  6073. format(line, sizeof(line), "Mod9=%d\r\n", VehicleMods[vehicleid][9]); fwrite(handle, line);
  6074. format(line, sizeof(line), "Mod10=%d\r\n", VehicleMods[vehicleid][10]); fwrite(handle, line);
  6075. format(line, sizeof(line), "Mod11=%d\r\n", VehicleMods[vehicleid][11]); fwrite(handle, line);
  6076. format(line, sizeof(line), "Mod12=%d\r\n", VehicleMods[vehicleid][12]); fwrite(handle, line);
  6077. format(line, sizeof(line), "Mod13=%d\r\n", VehicleMods[vehicleid][13]); fwrite(handle, line);
  6078. format(line, sizeof(line), "Paintjob=%d\r\n", VehiclePaintjob[vehicleid]); fwrite(handle, line);
  6079. fclose(handle);
  6080. }
  6081.  
  6082. UpdateVehicle(vehicleid, removeold)
  6083. {
  6084. if(VehicleCreated[vehicleid])
  6085. {
  6086. if(removeold)
  6087. {
  6088. new Float:health;
  6089. GetVehicleHealth(VehicleID[vehicleid], health);
  6090. new engine, lights, alarm, doors, bonnet, boot, objective;
  6091. GetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, boot, objective);
  6092. //new panels, doorsd, lightsd, tires;
  6093. //GetVehicleDamageStatus(VehicleID[vehicleid], panels, doorsd, lightsd, tires);
  6094. DestroyVehicle(VehicleID[vehicleid]);
  6095. VehicleID[vehicleid] = CreateVehicle(VehicleModel[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1],
  6096. VehiclePos[vehicleid][2], VehiclePos[vehicleid][3], VehicleColor[vehicleid][0], VehicleColor[vehicleid][1], 3600);
  6097. SetVehicleHealth(VehicleID[vehicleid], health);
  6098. SetVehicleParamsEx(VehicleID[vehicleid], engine, lights, alarm, doors, bonnet, boot, objective);
  6099. //UpdateVehicleDamageStatus(VehicleID[vehicleid], panels, doorsd, lightsd, tires);
  6100. }
  6101. else
  6102. {
  6103. VehicleID[vehicleid] = CreateVehicle(VehicleModel[vehicleid], VehiclePos[vehicleid][0], VehiclePos[vehicleid][1],
  6104. VehiclePos[vehicleid][2], VehiclePos[vehicleid][3], VehicleColor[vehicleid][0], VehicleColor[vehicleid][1], 3600);
  6105. }
  6106. LinkVehicleToInterior(VehicleID[vehicleid], VehicleInterior[vehicleid]);
  6107. SetVehicleVirtualWorld(VehicleID[vehicleid], VehicleWorld[vehicleid]);
  6108. SetVehicleNumberPlate(VehicleID[vehicleid], VehicleNumberPlate[vehicleid]);
  6109. for(new i=0; i < sizeof(VehicleMods[]); i++)
  6110. {
  6111. AddVehicleComponent(VehicleID[vehicleid], VehicleMods[vehicleid][i]);
  6112. }
  6113. ChangeVehiclePaintjob(VehicleID[vehicleid], VehiclePaintjob[vehicleid]);
  6114. UpdateVehicleLabel(vehicleid, removeold);
  6115. }
  6116. }
  6117.  
  6118. UpdateVehicleLabel(vehicleid, removeold)
  6119. {
  6120. if(VehicleCreated[vehicleid] == VEHICLE_DEALERSHIP)
  6121. {
  6122. if(removeold)
  6123. {
  6124. Delete3DTextLabel(VehicleLabel[vehicleid]);
  6125. }
  6126. new labeltext[128];
  6127. format(labeltext, sizeof(labeltext), "%s\nID: %d\nDealership: %s\nPrice: $%d", VehicleNames[VehicleModel[vehicleid]-400],
  6128. vehicleid, VehicleOwner[vehicleid], VehicleValue[vehicleid]);
  6129. VehicleLabel[vehicleid] = Create3DTextLabel(labeltext, 0xBB7700DD, 0, 0, 0, 10.0, 0);
  6130. Attach3DTextLabelToVehicle(VehicleLabel[vehicleid], VehicleID[vehicleid], 0, 0, 0);
  6131. }
  6132. }
  6133.  
  6134. IsValidVehicle(vehicleid)
  6135. {
  6136. if(vehicleid < 1 || vehicleid >= MAX_DVEHICLES) return 0;
  6137. if(VehicleCreated[vehicleid]) return 1;
  6138. return 0;
  6139. }
  6140.  
  6141. GetVehicleID(vehicleid)
  6142. {
  6143. for(new i=1; i < MAX_DVEHICLES; i++)
  6144. {
  6145. if(VehicleCreated[i] && VehicleID[i] == vehicleid) return i;
  6146. }
  6147. return 0;
  6148. }
  6149.  
  6150. GetPlayerVehicles(playerid)
  6151. {
  6152. new count;
  6153. for(new i=1; i < MAX_DVEHICLES; i++)
  6154. {
  6155. if(VehicleCreated[i] == VEHICLE_PLAYER && strcmp(VehicleOwner[i], PlayerName(playerid)) == 0)
  6156. {
  6157. count++;
  6158. }
  6159. }
  6160. return count;
  6161. }
  6162.  
  6163. GetPlayerVehicleAccess(playerid, vehicleid)
  6164. {
  6165. if(IsValidVehicle(vehicleid))
  6166. {
  6167. if(VehicleCreated[vehicleid] == VEHICLE_DEALERSHIP)
  6168. {
  6169. if(PlayerInfo[playerid][pAdmin] < 1338)
  6170. {
  6171. return 3;
  6172. }
  6173. }
  6174. else if(VehicleCreated[vehicleid] == VEHICLE_PLAYER)
  6175. {
  6176. if(strcmp(VehicleOwner[vehicleid], PlayerName(playerid)) == 0)
  6177. {
  6178. return 1;
  6179. }
  6180. else if(GetPVarInt(playerid, "CarKeys") == vehicleid)
  6181. {
  6182. return 2;
  6183. }
  6184. }
  6185. }
  6186. else
  6187. {
  6188. return 2;
  6189. }
  6190. return 0;
  6191. }
  6192.  
  6193. LoadDealerships()
  6194. {
  6195. new File:handle, count;
  6196. new Filename[64], line[256];
  6197. for(new i=1; i < MAX_DEALERSHIPS; i++)
  6198. {
  6199. format(Filename, sizeof(Filename), DEALERSHIP_File_PATH "d%d.ini", i);
  6200. if(!fexist(Filename)) continue;
  6201. handle = fopen(Filename, io_read);
  6202. while(fread(handle, line))
  6203. {
  6204. StripNL(line);
  6205. if(!line[0]) continue;
  6206. if(strcmp(line, "Created=", false, 8) == 0) DealershipCreated[i] = strval(line[8]);
  6207. else if(strcmp(line, "Pos=", false, 4) == 0) sscanf(line[4], "p,fff", DealershipPos[i][0],
  6208. DealershipPos[i][1], DealershipPos[i][2]);
  6209. }
  6210. fclose(handle);
  6211. if(DealershipCreated[i]) count++;
  6212. }
  6213. printf(" Loaded %d dealerships", count);
  6214. }
  6215.  
  6216. SaveDealership(dealerid)
  6217. {
  6218. new Filename[64], line[256];
  6219. format(Filename, sizeof(Filename), DEALERSHIP_File_PATH "d%d.ini", dealerid);
  6220. new File:handle = fopen(Filename, io_write);
  6221. format(line, sizeof(line), "Created=%d\r\n", DealershipCreated[dealerid]); fwrite(handle, line);
  6222. format(line, sizeof(line), "Pos=%.3f,%.3f,%.3f\r\n", DealershipPos[dealerid][0],
  6223. DealershipPos[dealerid][1], DealershipPos[dealerid][2]);
  6224. fwrite(handle, line);
  6225. fclose(handle);
  6226. }
  6227.  
  6228. UpdateDealership(dealerid, removeold)
  6229. {
  6230. if(DealershipCreated[dealerid])
  6231. {
  6232. if(removeold)
  6233. {
  6234. Delete3DTextLabel(DealershipLabel[dealerid]);
  6235. }
  6236. new labeltext[32];
  6237. format(labeltext, sizeof(labeltext), "Vehicle Dealership\nID: %d", dealerid);
  6238. DealershipLabel[dealerid] = Create3DTextLabel(labeltext, 0x00BB00DD, DealershipPos[dealerid][0],
  6239. DealershipPos[dealerid][1], DealershipPos[dealerid][2]+0.5, 20.0, 0);
  6240. }
  6241. }
  6242.  
  6243. IsValidDealership(dealerid)
  6244. {
  6245. if(dealerid < 1 || dealerid >= MAX_DEALERSHIPS) return 0;
  6246. if(DealershipCreated[dealerid]) return 1;
  6247. return 0;
  6248. }
  6249.  
  6250. LoadFuelStations()
  6251. {
  6252. new File:handle, count;
  6253. new Filename[64], line[256];
  6254. for(new i=1; i < MAX_FUEL_STATIONS; i++)
  6255. {
  6256. format(Filename, sizeof(Filename), FUEL_STATION_File_PATH "f%d.ini", i);
  6257. if(!fexist(Filename)) continue;
  6258. handle = fopen(Filename, io_read);
  6259. while(fread(handle, line))
  6260. {
  6261. StripNL(line);
  6262. if(!line[0]) continue;
  6263. if(strcmp(line, "Created=", false, 8) == 0) FuelStationCreated[i] = strval(line[8]);
  6264. else if(strcmp(line, "Pos=", false, 4) == 0) sscanf(line[4], "p,fff", FuelStationPos[i][0],
  6265. FuelStationPos[i][1], FuelStationPos[i][2]);
  6266. }
  6267. fclose(handle);
  6268. if(FuelStationCreated[i]) count++;
  6269. }
  6270. printf(" Loaded %d fuel stations", count);
  6271. }
  6272.  
  6273. SaveFuelStation(stationid)
  6274. {
  6275. new Filename[64], line[256];
  6276. format(Filename, sizeof(Filename), FUEL_STATION_File_PATH "f%d.ini", stationid);
  6277. new File:handle = fopen(Filename, io_write);
  6278. format(line, sizeof(line), "Created=%d\r\n", FuelStationCreated[stationid]); fwrite(handle, line);
  6279. format(line, sizeof(line), "Pos=%.3f,%.3f,%.3f\r\n", FuelStationPos[stationid][0],
  6280. FuelStationPos[stationid][1], FuelStationPos[stationid][2]);
  6281. fwrite(handle, line);
  6282. fclose(handle);
  6283. }
  6284.  
  6285. UpdateFuelStation(stationid, removeold)
  6286. {
  6287. if(FuelStationCreated[stationid])
  6288. {
  6289. if(removeold)
  6290. {
  6291. Delete3DTextLabel(FuelStationLabel[stationid]);
  6292. }
  6293. new labeltext[32];
  6294. format(labeltext, sizeof(labeltext), "Fuel Station\nID: %d\n/fuel", stationid);
  6295. FuelStationLabel[stationid] = Create3DTextLabel(labeltext, 0x00BBFFDD, FuelStationPos[stationid][0],
  6296. FuelStationPos[stationid][1], FuelStationPos[stationid][2]+0.5, 20.0, 0);
  6297. }
  6298. }
  6299.  
  6300. IsValidFuelStation(stationid)
  6301. {
  6302. if(stationid < 1 || stationid >= MAX_FUEL_STATIONS) return 0;
  6303. if(FuelStationCreated[stationid]) return 1;
  6304. return 0;
  6305. }
  6306. stock GetVehicleName(vehicleid, model[], len)
  6307. {
  6308. new vid = GetVehicleModel(vehicleid);
  6309. if(vid == 400) return format(model, len, "Landstalker", 0);
  6310. else if(vid == 401) return format(model, len, "Bravura", 0);
  6311. else if(vid == 402) return format(model, len, "Buffalo", 0);
  6312. else if(vid == 403) return format(model, len, "Linerunner", 0);
  6313. else if(vid == 404) return format(model, len, "Perenail", 0);
  6314. else if(vid == 405) return format(model, len, "Sentinel", 0);
  6315. else if(vid == 406) return format(model, len, "Dumper", 0);
  6316. else if(vid == 407) return format(model, len, "Firetruck", 0);
  6317. else if(vid == 408) return format(model, len, "Trashmaster", 0);
  6318. else if(vid == 409) return format(model, len, "Stretch", 0);
  6319. else if(vid == 410) return format(model, len, "Manana", 0);
  6320. else if(vid == 411) return format(model, len, "Infernus", 0);
  6321. else if(vid == 412) return format(model, len, "Vodooo", 0);
  6322. else if(vid == 413) return format(model, len, "Pony", 0);
  6323. else if(vid == 414) return format(model, len, "Mule", 0);
  6324. else if(vid == 415) return format(model, len, "Cheetah", 0);
  6325. else if(vid == 416) return format(model, len, "Ambulance", 0);
  6326. else if(vid == 417) return format(model, len, "Leviathan", 0);
  6327. else if(vid == 418) return format(model, len, "Moonbeam", 0);
  6328. else if(vid == 419) return format(model, len, "Esperanto", 0);
  6329. else if(vid == 420) return format(model, len, "Taxi", 0);
  6330. else if(vid == 421) return format(model, len, "Washington", 0);
  6331. else if(vid == 422) return format(model, len, "Bobcat", 0);
  6332. else if(vid == 423) return format(model, len, "Mr Whoopee", 0);
  6333. else if(vid == 424) return format(model, len, "BF Injection", 0);
  6334. else if(vid == 425) return format(model, len, "Hunter", 0);
  6335. else if(vid == 426) return format(model, len, "Premier", 0);
  6336. else if(vid == 427) return format(model, len, "S.W.A.T Truck", 0);
  6337. else if(vid == 428) return format(model, len, "Securicar", 0);
  6338. else if(vid == 429) return format(model, len, "Banshee", 0);
  6339. else if(vid == 430) return format(model, len, "Predator", 0);
  6340. else if(vid == 431) return format(model, len, "Bus", 0);
  6341. else if(vid == 432) return format(model, len, "Rhino", 0);
  6342. else if(vid == 433) return format(model, len, "Barracks", 0);
  6343. else if(vid == 434) return format(model, len, "Hotknife", 0);
  6344. else if(vid == 435) return format(model, len, "Trailer", 0);
  6345. else if(vid == 436) return format(model, len, "Previon", 0);
  6346. else if(vid == 437) return format(model, len, "Coach", 0);
  6347. else if(vid == 438) return format(model, len, "Cabbie", 0);
  6348. else if(vid == 439) return format(model, len, "Stallion", 0);
  6349. else if(vid == 440) return format(model, len, "Rumpo", 0);
  6350. else if(vid == 441) return format(model, len, "RC Bandit", 0);
  6351. else if(vid == 442) return format(model, len, "Romero", 0);
  6352. else if(vid == 443) return format(model, len, "Packer", 0);
  6353. else if(vid == 444) return format(model, len, "Monster", 0);
  6354. else if(vid == 445) return format(model, len, "Admiral", 0);
  6355. else if(vid == 446) return format(model, len, "Squalo", 0);
  6356. else if(vid == 447) return format(model, len, "Seasparrow", 0);
  6357. else if(vid == 448) return format(model, len, "Pizza Boy", 0);
  6358. else if(vid == 449) return format(model, len, "Tram", 0);
  6359. else if(vid == 450) return format(model, len, "Trailer 2", 0);
  6360. else if(vid == 451) return format(model, len, "Turismo", 0);
  6361. else if(vid == 452) return format(model, len, "Speeder", 0);
  6362. else if(vid == 453) return format(model, len, "Refeer", 0);
  6363. else if(vid == 454) return format(model, len, "Tropic", 0);
  6364. else if(vid == 455) return format(model, len, "Flatbed", 0);
  6365. else if(vid == 456) return format(model, len, "Yankee", 0);
  6366. else if(vid == 457) return format(model, len, "Caddy", 0);
  6367. else if(vid == 458) return format(model, len, "Solair", 0);
  6368. else if(vid == 459) return format(model, len, "Top Fun", 0);
  6369. else if(vid == 460) return format(model, len, "Skimmer", 0);
  6370. else if(vid == 461) return format(model, len, "PCJ-600", 0);
  6371. else if(vid == 462) return format(model, len, "Faggio", 0);
  6372. else if(vid == 463) return format(model, len, "Freeway", 0);
  6373. else if(vid == 464) return format(model, len, "RC Baron", 0);
  6374. else if(vid == 465) return format(model, len, "RC Raider", 0);
  6375. else if(vid == 466) return format(model, len, "Glendade", 0);
  6376. else if(vid == 467) return format(model, len, "Oceanic", 0);
  6377. else if(vid == 468) return format(model, len, "Sanchez", 0);
  6378. else if(vid == 469) return format(model, len, "Sparrow", 0);
  6379. else if(vid == 470) return format(model, len, "Patriot", 0);
  6380. else if(vid == 471) return format(model, len, "Quad", 0);
  6381. else if(vid == 472) return format(model, len, "Coastguard", 0);
  6382. else if(vid == 473) return format(model, len, "Dinghy", 0);
  6383. else if(vid == 474) return format(model, len, "Hermes", 0);
  6384. else if(vid == 475) return format(model, len, "Sabre", 0);
  6385. else if(vid == 476) return format(model, len, "Rustler", 0);
  6386. else if(vid == 477) return format(model, len, "ZR-350", 0);
  6387. else if(vid == 478) return format(model, len, "Walton", 0);
  6388. else if(vid == 479) return format(model, len, "Regina", 0);
  6389. else if(vid == 480) return format(model, len, "Comet", 0);
  6390. else if(vid == 481) return format(model, len, "BMX", 0);
  6391. else if(vid == 482) return format(model, len, "Burrito", 0);
  6392. else if(vid == 483) return format(model, len, "Camper", 0);
  6393. else if(vid == 484) return format(model, len, "Marquis", 0);
  6394. else if(vid == 485) return format(model, len, "Baggage", 0);
  6395. else if(vid == 486) return format(model, len, "Dozer", 0);
  6396. else if(vid == 487) return format(model, len, "Maverick", 0);
  6397. else if(vid == 488) return format(model, len, "News Maverick", 0);
  6398. else if(vid == 489) return format(model, len, "Rancher", 0);
  6399. else if(vid == 490) return format(model, len, "Federal Rancher", 0);
  6400. else if(vid == 491) return format(model, len, "Virgo", 0);
  6401. else if(vid == 492) return format(model, len, "Greenwood", 0);
  6402. else if(vid == 493) return format(model, len, "Jetmax", 0);
  6403. else if(vid == 494) return format(model, len, "Hotring", 0);
  6404. else if(vid == 495) return format(model, len, "Sandking", 0);
  6405. else if(vid == 496) return format(model, len, "Blista Compact", 0);
  6406. else if(vid == 497) return format(model, len, "Police Maverick", 0);
  6407. else if(vid == 498) return format(model, len, "Boxville", 0);
  6408. else if(vid == 499) return format(model, len, "Benson", 0);
  6409. else if(vid == 500) return format(model, len, "Mesa", 0);
  6410. else if(vid == 501) return format(model, len, "RC Goblin", 0);
  6411. else if(vid == 502) return format(model, len, "Hotring A", 0);
  6412. else if(vid == 503) return format(model, len, "Hotring B", 0);
  6413. else if(vid == 504) return format(model, len, "Blooding Banger", 0);
  6414. else if(vid == 505) return format(model, len, "Rancher", 0);
  6415. else if(vid == 506) return format(model, len, "Super GT", 0);
  6416. else if(vid == 507) return format(model, len, "Elegant", 0);
  6417. else if(vid == 508) return format(model, len, "Journey", 0);
  6418. else if(vid == 509) return format(model, len, "Bike", 0);
  6419. else if(vid == 510) return format(model, len, "Mountain Bike", 0);
  6420. else if(vid == 511) return format(model, len, "Beagle", 0);
  6421. else if(vid == 512) return format(model, len, "Cropduster", 0);
  6422. else if(vid == 513) return format(model, len, "Stuntplane", 0);
  6423. else if(vid == 514) return format(model, len, "Petrol", 0);
  6424. else if(vid == 515) return format(model, len, "Roadtrain", 0);
  6425. else if(vid == 516) return format(model, len, "Nebula", 0);
  6426. else if(vid == 517) return format(model, len, "Majestic", 0);
  6427. else if(vid == 518) return format(model, len, "Buccaneer", 0);
  6428. else if(vid == 519) return format(model, len, "Shamal", 0);
  6429. else if(vid == 520) return format(model, len, "Hydra", 0);
  6430. else if(vid == 521) return format(model, len, "FCR-300", 0);
  6431. else if(vid == 522) return format(model, len, "NRG-500", 0);
  6432. else if(vid == 523) return format(model, len, "HPV-1000", 0);
  6433. else if(vid == 524) return format(model, len, "Cement Truck", 0);
  6434. else if(vid == 525) return format(model, len, "Towtruck", 0);
  6435. else if(vid == 526) return format(model, len, "Fortune", 0);
  6436. else if(vid == 527) return format(model, len, "Cadrona", 0);
  6437. else if(vid == 528) return format(model, len, "Federal Truck", 0);
  6438. else if(vid == 529) return format(model, len, "Williard", 0);
  6439. else if(vid == 530) return format(model, len, "Fork Lift", 0);
  6440. else if(vid == 531) return format(model, len, "Tractor", 0);
  6441. else if(vid == 532) return format(model, len, "Combine", 0);
  6442. else if(vid == 533) return format(model, len, "Feltzer", 0);
  6443. else if(vid == 534) return format(model, len, "Remington", 0);
  6444. else if(vid == 535) return format(model, len, "Slamvan", 0);
  6445. else if(vid == 536) return format(model, len, "Blade", 0);
  6446. else if(vid == 537) return format(model, len, "Freight", 0);
  6447. else if(vid == 538) return format(model, len, "Streak", 0);
  6448. else if(vid == 539) return format(model, len, "Vortex", 0);
  6449. else if(vid == 540) return format(model, len, "Vincent", 0);
  6450. else if(vid == 541) return format(model, len, "Bullet", 0);
  6451. else if(vid == 542) return format(model, len, "Clover", 0);
  6452. else if(vid == 543) return format(model, len, "Sadler", 0);
  6453. else if(vid == 544) return format(model, len, "Stairs Firetruck", 0);
  6454. else if(vid == 545) return format(model, len, "Hustler", 0);
  6455. else if(vid == 546) return format(model, len, "Intruder", 0);
  6456. else if(vid == 547) return format(model, len, "Primo", 0);
  6457. else if(vid == 548) return format(model, len, "Cargobob", 0);
  6458. else if(vid == 549) return format(model, len, "Tampa", 0);
  6459. else if(vid == 550) return format(model, len, "Sunrise", 0);
  6460. else if(vid == 551) return format(model, len, "Merit", 0);
  6461. else if(vid == 552) return format(model, len, "Utility Van", 0);
  6462. else if(vid == 553) return format(model, len, "Nevada", 0);
  6463. else if(vid == 554) return format(model, len, "Yosemite", 0);
  6464. else if(vid == 555) return format(model, len, "Windsor", 0);
  6465. else if(vid == 556) return format(model, len, "Monster A", 0);
  6466. else if(vid == 557) return format(model, len, "Monster B", 0);
  6467. else if(vid == 558) return format(model, len, "Uranus", 0);
  6468. else if(vid == 559) return format(model, len, "Jester", 0);
  6469. else if(vid == 560) return format(model, len, "Sultan", 0);
  6470. else if(vid == 561) return format(model, len, "Stratum", 0);
  6471. else if(vid == 562) return format(model, len, "Elegy", 0);
  6472. else if(vid == 563) return format(model, len, "Raindance", 0);
  6473. else if(vid == 564) return format(model, len, "RC Tiger", 0);
  6474. else if(vid == 565) return format(model, len, "Flash", 0);
  6475. else if(vid == 566) return format(model, len, "Tahoma", 0);
  6476. else if(vid == 567) return format(model, len, "Savanna", 0);
  6477. else if(vid == 568) return format(model, len, "Bandito", 0);
  6478. else if(vid == 569) return format(model, len, "Freight Flat", 0);
  6479. else if(vid == 570) return format(model, len, "Streak", 0);
  6480. else if(vid == 571) return format(model, len, "Kart", 0);
  6481. else if(vid == 572) return format(model, len, "Mower", 0);
  6482. else if(vid == 573) return format(model, len, "Duneride", 0);
  6483. else if(vid == 574) return format(model, len, "Sweeper", 0);
  6484. else if(vid == 575) return format(model, len, "Broadway", 0);
  6485. else if(vid == 576) return format(model, len, "Tornado", 0);
  6486. else if(vid == 577) return format(model, len, "AT-400", 0);
  6487. else if(vid == 578) return format(model, len, "DFT-30", 0);
  6488. else if(vid == 579) return format(model, len, "Huntley", 0);
  6489. else if(vid == 580) return format(model, len, "Stafford", 0);
  6490. else if(vid == 581) return format(model, len, "BF-400", 0);
  6491. else if(vid == 582) return format(model, len, "Raindance", 0);
  6492. else if(vid == 583) return format(model, len, "News Van", 0);
  6493. else if(vid == 584) return format(model, len, "Tug", 0);
  6494. else if(vid == 585) return format(model, len, "Petrol Tanker", 0);
  6495. else if(vid == 586) return format(model, len, "Wayfarer", 0);
  6496. else if(vid == 587) return format(model, len, "Euros", 0);
  6497. else if(vid == 588) return format(model, len, "Hotdog", 0);
  6498. else if(vid == 589) return format(model, len, "Club", 0);
  6499. else if(vid == 590) return format(model, len, "Freight Box", 0);
  6500. else if(vid == 591) return format(model, len, "Trailer 3", 0);
  6501. else if(vid == 592) return format(model, len, "Andromada", 0);
  6502. else if(vid == 593) return format(model, len, "Dodo", 0);
  6503. else if(vid == 594) return format(model, len, "RC Cam", 0);
  6504. else if(vid == 595) return format(model, len, "Launch", 0);
  6505. else if(vid == 596) return format(model, len, "LSPD Patrol Car", 0);
  6506. else if(vid == 597) return format(model, len, "FBI Patrol Car", 0);
  6507. else if(vid == 598) return format(model, len, "NG Patrol Car", 0);
  6508. else if(vid == 599) return format(model, len, "LSPD Patrol Ranger", 0);
  6509. else if(vid == 600) return format(model, len, "Picador", 0);
  6510. else if(vid == 601) return format(model, len, "S.W.A.T Tank", 0);
  6511. else if(vid == 602) return format(model, len, "Alpha", 0);
  6512. else if(vid == 603) return format(model, len, "Phoenix", 0);
  6513. else if(vid == 609) return format(model, len, "Boxville", 0);
  6514. return 0;
  6515. }
  6516. CMD:jail(playerid, params[])
  6517. {
  6518. if(PlayerInfo[playerid][pAdmin] >= 1)
  6519. {
  6520. new targetid, minutes;
  6521. if(sscanf(params, "ri", targetid, minutes)) return SendClientMessage(playerid, COLOR_RED,"Usage: /ajail [ID/Name] [Minutes]");
  6522. if(targetid == playerid) return SendClientMessage(playerid, COLOR_RED, "You can't jail yourself!"); //comment this line out, if you wanna test this command on yourself!
  6523. if(PlayerInfo[targetid][pAdmin] > PlayerInfo[playerid][pAdmin]) return SendClientMessage(playerid, COLOR_RED, "You can't jail higher level admins!"); //the performer can't jail higher admins!
  6524. else
  6525. {
  6526. new str[128]; //create a new string
  6527. format(str, sizeof(str), "Admin %s has jailed %s for %d minutes.", Name(playerid), Name(targetid), minutes); //get the admin's name, the player's and show the minutes
  6528. SendClientMessageToAll(COLOR_RED,str); //let everybody know what you did, this will send the message to everyone
  6529. JailTimer[targetid] = SetTimer("Unjail", minutes*60*1000, false); //now HERE we're setting the jailtimer from the variable created, it will calculate the milliseconds to seconds, multiplicated with the amount of minutes we gave
  6530. SetPlayerPos(targetid, 264.4176, 77.8930, 1001.0391); //Sets the player's position to the jail in LS
  6531. inJail[targetid] = true; //now, here we'll check, if the player's in jail, we'll set the value to "true", means that he IS in jail
  6532. GameTextForPlayer(playerid, "~p~You have been jailed for breaking rules.", 10000, 6); //this is for decorating and writing a big "JAILED" for the player
  6533. }
  6534. }
  6535. else return SendClientMessage(playerid, COLOR_RED, "You have to be level 1 to use this command!"); //if he isn't allowed to use this command, send him this message
  6536. return 1;
  6537. }
  6538. forward Unjail(playerid);
  6539. public Unjail(playerid)
  6540. {
  6541. SpawnPlayer(playerid);
  6542. SetPlayerInterior(playerid, 0);
  6543. inJail[playerid] = false;
  6544. KillTimer(JailTimer[playerid]);
  6545. GameTextForPlayer(playerid, "~g~Unjailed, Do not break rules again.", 5000, 6);
  6546. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement