Wiruspwns

Untitled

Aug 5th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.99 KB | None | 0 0
  1. /*
  2. * Version: MPL 1.1
  3. *
  4. * The contents of this file are subject to the Mozilla Public License Version
  5. * 1.1 (the "License"); you may not use this file except in compliance with
  6. * the License. You may obtain a copy of the License at
  7. * [url]http://www.mozilla.org/MPL/[/url]
  8. *
  9. * Software distributed under the License is distributed on an "AS IS" basis,
  10. * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. * for the specific language governing rights and limitations under the
  12. * License.
  13. *
  14. * The Original Code is the sscanf 2.0 SA:MP plugin.
  15. *
  16. * The Initial Developer of the Original Code is Alex "Y_Less" Cole.
  17. * Portions created by the Initial Developer are Copyright (C) 2010
  18. * the Initial Developer. All Rights Reserved.
  19. *
  20. * Contributor(s):
  21. *
  22. * Special Thanks to:
  23. *
  24. * SA:MP Team past, present and future
  25. */
  26.  
  27. #if defined _inc_a_npc
  28. #pragma library sscanf
  29. #elseif !defined _inc_a_samp
  30. #error Please include <a_npc> or <a_samp> first.
  31. #endif
  32.  
  33. #define SSCANF:%0(%1) sscanf_%0(%1);public sscanf_%0(%1)
  34.  
  35. #if defined sscanf
  36. #error sscanf (possibly the PAWN version) already defined.
  37. #endif
  38.  
  39. native sscanf(const data[], const format[], {Float,_}:...);
  40. native unformat(const data[], const format[], {Float,_}:...) = sscanf;
  41. native SSCANF_Init(players, invalid, len);
  42. native SSCANF_Join(playerid, const name[], npc);
  43. native SSCANF_Leave(playerid);
  44.  
  45. native SSCANF_Option(const name[], value);
  46.  
  47. stock const
  48. SSCANF_QUIET[] = "SSCANF_QUIET",
  49. OLD_DEFAULT_NAME[] = "OLD_DEFAULT_NAME",
  50. MATCH_NAME_PARTIAL[] = "MATCH_NAME_PARTIAL",
  51. CELLMIN_ON_MATCHES[] = "CELLMIN_ON_MATCHES",
  52. OLD_DEFAULT_KUSTOM[] = "OLD_DEFAULT_KUSTOM",
  53. OLD_DEFAULT_CUSTOM[] = "OLD_DEFAULT_CUSTOM";
  54.  
  55. static stock
  56. bool:SSCANF_gInit = false,
  57. SSCANF_g_sPlayers[MAX_PLAYERS char];
  58.  
  59. #if defined _inc_a_npc
  60. forward SSCANF_PlayerCheck();
  61.  
  62. /*
  63. OnNPCModeInit
  64.  
  65. Called when the script starts if it is a NPC mode, sets up the system,
  66. then calls the "real" OnNPCModeInit (using the new ALS 2 hook method).
  67. */
  68.  
  69. public OnNPCModeInit()
  70. {
  71. SSCANF_Init(MAX_PLAYERS, INVALID_PLAYER_ID, MAX_PLAYER_NAME);
  72. #if !defined SSCANF_NO_PLAYERS
  73. // Initialise the system.
  74. SSCANF_PlayerCheck();
  75. SetTimer("SSCANF_PlayerCheck", 1, 1);
  76. #endif
  77. #if defined SSCANF_OnNPCModeInit
  78. SSCANF_OnNPCModeInit();
  79. #endif
  80. return 1;
  81. }
  82.  
  83. #if defined _ALS_OnNPCModeInit
  84. #undef OnNPCModeInit
  85. #else
  86. #define _ALS_OnNPCModeInit
  87. #endif
  88. #define OnNPCModeInit SSCANF_OnNPCModeInit
  89. #if defined SSCANF_OnNPCModeInit
  90. forward SSCANF_OnNPCModeInit();
  91. #endif
  92.  
  93. /*
  94. SSCANF_PlayerCheck
  95.  
  96. NPC modes have no "OnPlayerConnect callback, so we need to simulate one.
  97. */
  98.  
  99. #if !defined SSCANF_NO_PLAYERS
  100. public SSCANF_PlayerCheck()
  101. {
  102. for (new i = 0; i != MAX_PLAYERS; ++i)
  103. {
  104. if (IsPlayerConnected(i))
  105. {
  106. if (!SSCANF_g_sPlayers{i})
  107. {
  108. new
  109. name[MAX_PLAYER_NAME];
  110. GetPlayerName(i, name, sizeof (name));
  111. // We have no way to know if they are an NPC or not!
  112. SSCANF_Join(i, name, 0);
  113. SSCANF_g_sPlayers{i} = 1;
  114. }
  115. }
  116. else
  117. {
  118. if (SSCANF_g_sPlayers{i})
  119. {
  120. SSCANF_Leave(i);
  121. SSCANF_g_sPlayers{i} = 0;
  122. }
  123. }
  124. }
  125. }
  126. #endif
  127. #else
  128. /*
  129. OnFilterScriptInit
  130.  
  131. Called when the script starts if it is a filterscript, sets up the system,
  132. then calls the "real" OnFilterScriptInit (using the new ALS 2 hook
  133. method).
  134. */
  135.  
  136. public OnFilterScriptInit()
  137. {
  138. SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME);
  139. SSCANF_gInit = true;
  140. #if defined SSCANF_OnFilterScriptInit
  141. SSCANF_OnFilterScriptInit();
  142. #endif
  143. return 1;
  144. }
  145.  
  146. #if defined _ALS_OnFilterScriptInit
  147. #undef OnFilterScriptInit
  148. #else
  149. #define _ALS_OnFilterScriptInit
  150. #endif
  151. #define OnFilterScriptInit SSCANF_OnFilterScriptInit
  152. #if defined SSCANF_OnFilterScriptInit
  153. forward SSCANF_OnFilterScriptInit();
  154. #endif
  155.  
  156. /*
  157. OnGameModeInit
  158.  
  159. Called when the script starts if it is a gamemode. This callback is also
  160. called in filterscripts so we don't want to reinitialise the system in
  161. that case.
  162. */
  163.  
  164. public OnGameModeInit()
  165. {
  166. if (!SSCANF_gInit)
  167. {
  168. SSCANF_Init(GetMaxPlayers(), INVALID_PLAYER_ID, MAX_PLAYER_NAME);
  169. SSCANF_gInit = true;
  170. }
  171. #if defined SSCANF_OnGameModeInit
  172. SSCANF_OnGameModeInit();
  173. #endif
  174. return 1;
  175. }
  176.  
  177. #if defined _ALS_OnGameModeInit
  178. #undef OnGameModeInit
  179. #else
  180. #define _ALS_OnGameModeInit
  181. #endif
  182. #define OnGameModeInit SSCANF_OnGameModeInit
  183. #if defined SSCANF_OnGameModeInit
  184. forward SSCANF_OnGameModeInit();
  185. #endif
  186.  
  187. /*
  188. OnPlayerConnect
  189.  
  190. Called when a player connects. Actually increments an internal count so
  191. that if a script ends and "OnPlayerDisconnect" is called then "sscanf"
  192. still knows that the player is really connected. Also stores their name
  193. internally.
  194. */
  195.  
  196. public OnPlayerConnect(playerid)
  197. {
  198. new
  199. name[MAX_PLAYER_NAME];
  200. GetPlayerName(playerid, name, sizeof (name));
  201. SSCANF_Join(playerid, name, IsPlayerNPC(playerid));
  202. #if defined SSCANF_OnPlayerConnect
  203. SSCANF_OnPlayerConnect(playerid);
  204. #endif
  205. return 1;
  206. }
  207.  
  208. #if defined _ALS_OnPlayerConnect
  209. #undef OnPlayerConnect
  210. #else
  211. #define _ALS_OnPlayerConnect
  212. #endif
  213. #define OnPlayerConnect SSCANF_OnPlayerConnect
  214. #if defined SSCANF_OnPlayerConnect
  215. forward SSCANF_OnPlayerConnect(playerid);
  216. #endif
  217.  
  218. /*
  219. OnPlayerDisconnect
  220.  
  221. Called when a player disconnects, or when a script is ended.
  222. */
  223.  
  224. public OnPlayerDisconnect(playerid, reason)
  225. {
  226. #if defined SSCANF_OnPlayerDisconnect
  227. SSCANF_OnPlayerDisconnect(playerid, reason);
  228. #endif
  229. SSCANF_Leave(playerid);
  230. return 1;
  231. }
  232.  
  233. #if defined _ALS_OnPlayerDisconnect
  234. #undef OnPlayerDisconnect
  235. #else
  236. #define _ALS_OnPlayerDisconnect
  237. #endif
  238. #define OnPlayerDisconnect SSCANF_OnPlayerDisconnect
  239. #if defined SSCANF_OnPlayerDisconnect
  240. forward SSCANF_OnPlayerDisconnect(playerid, reason);
  241. #endif
  242. #endif
  243.  
  244. #define SSCANF_Init
  245. #define SSCANF_Join
  246. #define SSCANF_Leave
  247.  
  248. #define extract%0->%1; EXTRN%1;unformat(_:EXTRZ:EXTRV:EXTRX:%0,##,%1,,);
  249. #define unformat(_:EXTRZ:EXTRV:EXTRX:%0,##,%1);%2else if (unformat(_:EXTRV:EXTRX:%0,##,%1))
  250.  
  251. #define EXTRV:EXTRX:%0<%3>##,%9new%1,%2) EXTRY:%0##P<%3>,|||%1|||%2)
  252. #define EXTRX:%0##,%9new%1,%2) EXTRY:%0##,|||%1|||%2)
  253. #define EXTRY: EXTR8:EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:
  254.  
  255. #define EXTR8:EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3=%9|||%4) %6_EXTRO:%0##%1,%2|||%3=%9|||%4)
  256. #define EXTR9:EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%3=%9|||%4) __EXTRO:%0##%1,%2|||%3=%9|||%4)
  257. #define EXTR0:EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3[%7]|||%4) %6_EXTRW:%0##%1,%2|||%3[%7]|||%4)
  258. #define EXTR1:EXTR2:EXTR3:EXTR4:%0##%1,%2|||%3[%7]|||%4) __EXTRW:%0##%1,%2|||%3|||%4)
  259. #define EXTR2:EXTR3:EXTR4:%0##%1,%2|||%6:%3|||%4) %6_EXTRN:%0##%1,%2|||%3|||%4)
  260. #define EXTR3:EXTR4:%0##%1,,%2||||||%4) %0##%1,%2)
  261. #define EXTR4:%0##%1,%2|||%3|||%4) __EXTRN:%0##%1,%2|||%3|||%4)
  262.  
  263. // Optional specifiers.
  264. #define __EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1I"("#%9")"#,%2,%3|||%4|||%5)
  265. #define Float_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1F"("#%9")"#,%2,%3|||%4|||%5)
  266. #define player_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1U"("#%9")"#,%2,%3|||%4|||%5)
  267. #define string_EXTRO:%0##%1,%2|||%3[%7]=%9|||%4,%5) EXTRY:%0##%1S"("#%9")"#[%7],%2,%3|||%4|||%5)
  268.  
  269. // Normal specifiers (the double underscore is to work for "_:".
  270. #define __EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1i,%2,%3|||%4|||%5)
  271. #define Float_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1f,%2,%3|||%4|||%5)
  272. #define player_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1u,%2,%3|||%4|||%5)
  273. //#define string_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1s[%7],%2,%3|||%4|||%5)
  274.  
  275. // Array versions of normal specifiers.
  276. #define __EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<i>[%7],%2,%3|||%4|||%5)
  277. #define Float_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<f>[%7],%2,%3|||%4|||%5)
  278. #define player_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<u>[%7],%2,%3|||%4|||%5)
  279. #define string_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1s[%7],%2,%3|||%4|||%5)
  280.  
  281. // Get rid of excess leading space which causes warnings.
  282. #define EXTRN%0new%1; new%1;
  283.  
  284. #if !defined string
  285. #define string:
  286. #endif
  287.  
  288. #define player:
  289.  
  290. #define hex:
  291. #define hex_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1H"("#%9")"#,%2,%3|||%4|||%5)
  292. #define hex_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1h,%2,%3|||%4|||%5)
  293. #define hex_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<h>[%7],%2,%3|||%4|||%5)
  294.  
  295. #define bin:
  296. #define bin_EXTRO:%0##%1,%2|||%3=%9|||%4,%5) EXTRY:%0##%1B"("#%9")"#,%2,%3|||%4|||%5)
  297. #define bin_EXTRN:%0##%1,%2|||%3|||%4,%5) EXTRY:%0##%1b,%2,%3|||%4|||%5)
  298. #define bin_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<b>[%7],%2,%3|||%4|||%5)
  299.  
  300. #define kustom:%0<%1> %0
  301. #define kustom_EXTRO:%0##%1,%2|||%3<%8>=%9|||%4,%5) EXTRY:%0##%1K<%8>"("#%9")"#,%2,%3|||%4|||%5)
  302. #define kustom_EXTRN:%0##%1,%2|||%3<%8>|||%4,%5) EXTRY:%0##%1k<%8>,%2,%3|||%4|||%5)
  303. //#define bin_EXTRW:%0##%1,%2|||%3[%7]|||%4,%5) EXTRY:%0##%1a<b>[%7],%2,%3|||%4|||%5)
  304.  
  305. SSCANF:weapon(string[])
  306. {
  307. // This function is VERY basic, needs VASTLY improving to detect variations.
  308. if ('0' <= string[0] <= '9')
  309. {
  310. new
  311. ret = strval(string);
  312. if (0 <= ret <= 18 || 22 <= ret <= 46)
  313. {
  314. return ret;
  315. }
  316. }
  317. else if (!strcmp(string, "Unarmed")) return 0;
  318. else if (!strcmp(string, "Brass Knuckles")) return 1;
  319. else if (!strcmp(string, "Golf Club")) return 2;
  320. else if (!strcmp(string, "Night Stick")) return 3;
  321. else if (!strcmp(string, "Knife")) return 4;
  322. else if (!strcmp(string, "Baseball Bat")) return 5;
  323. else if (!strcmp(string, "Shovel")) return 6;
  324. else if (!strcmp(string, "Pool cue")) return 7;
  325. else if (!strcmp(string, "Katana")) return 8;
  326. else if (!strcmp(string, "Chainsaw")) return 9;
  327. else if (!strcmp(string, "Purple Dildo")) return 10;
  328. else if (!strcmp(string, "White Dildo")) return 11;
  329. else if (!strcmp(string, "Long White Dildo")) return 12;
  330. else if (!strcmp(string, "White Dildo 2")) return 13;
  331. else if (!strcmp(string, "Flowers")) return 14;
  332. else if (!strcmp(string, "Cane")) return 15;
  333. else if (!strcmp(string, "Grenades")) return 16;
  334. else if (!strcmp(string, "Tear Gas")) return 17;
  335. else if (!strcmp(string, "Molotovs")) return 18;
  336. else if (!strcmp(string, "Pistol")) return 22;
  337. else if (!strcmp(string, "Silenced Pistol")) return 23;
  338. else if (!strcmp(string, "Desert Eagle")) return 24;
  339. else if (!strcmp(string, "Shotgun")) return 25;
  340. else if (!strcmp(string, "Sawn Off Shotgun")) return 26;
  341. else if (!strcmp(string, "Combat Shotgun")) return 27;
  342. else if (!strcmp(string, "Micro Uzi")) return 28;
  343. else if (!strcmp(string, "Mac 10")) return 28;
  344. else if (!strcmp(string, "MP5")) return 29;
  345. else if (!strcmp(string, "AK47")) return 30;
  346. else if (!strcmp(string, "M4")) return 31;
  347. else if (!strcmp(string, "Tec9")) return 32;
  348. else if (!strcmp(string, "Rifle")) return 33;
  349. else if (!strcmp(string, "Sniper Rifle")) return 34;
  350. else if (!strcmp(string, "RPG")) return 35;
  351. else if (!strcmp(string, "Missile Launcher")) return 36;
  352. else if (!strcmp(string, "Flame Thrower")) return 37;
  353. else if (!strcmp(string, "Minigun")) return 38;
  354. else if (!strcmp(string, "Sachel Charges")) return 39;
  355. else if (!strcmp(string, "Detonator")) return 40;
  356. else if (!strcmp(string, "Spray Paint")) return 41;
  357. else if (!strcmp(string, "Fire Extinguisher")) return 42;
  358. else if (!strcmp(string, "Camera")) return 43;
  359. else if (!strcmp(string, "Nightvision Goggles")) return 44;
  360. else if (!strcmp(string, "Thermal Goggles")) return 45;
  361. else if (!strcmp(string, "Parachute")) return 46;
  362. return -1;
  363. }
  364.  
  365. SSCANF:vehicle(string[])
  366. {
  367. // This function is VERY basic, needs VASTLY improving to detect variations.
  368. if ('0' <= string[0] <= '9')
  369. {
  370. new
  371. ret = strval(string);
  372. if (400 <= ret <= 611)
  373. {
  374. return ret;
  375. }
  376. }
  377. else if (!strcmp(string, "Landstalker")) return 400;
  378. else if (!strcmp(string, "Bravura")) return 401;
  379. else if (!strcmp(string, "Buffalo")) return 402;
  380. else if (!strcmp(string, "Linerunner")) return 403;
  381. else if (!strcmp(string, "Perenniel")) return 404;
  382. else if (!strcmp(string, "Sentinel")) return 405;
  383. else if (!strcmp(string, "Dumper")) return 406;
  384. else if (!strcmp(string, "Firetruck")) return 407;
  385. else if (!strcmp(string, "Trashmaster")) return 408;
  386. else if (!strcmp(string, "Stretch")) return 409;
  387. else if (!strcmp(string, "Manana")) return 410;
  388. else if (!strcmp(string, "Infernus")) return 411;
  389. else if (!strcmp(string, "Voodoo")) return 412;
  390. else if (!strcmp(string, "Pony")) return 413;
  391. else if (!strcmp(string, "Mule")) return 414;
  392. else if (!strcmp(string, "Cheetah")) return 415;
  393. else if (!strcmp(string, "Ambulance")) return 416;
  394. else if (!strcmp(string, "Leviathan")) return 417;
  395. else if (!strcmp(string, "Moonbeam")) return 418;
  396. else if (!strcmp(string, "Esperanto")) return 419;
  397. else if (!strcmp(string, "Taxi")) return 420;
  398. else if (!strcmp(string, "Washington")) return 421;
  399. else if (!strcmp(string, "Bobcat")) return 422;
  400. else if (!strcmp(string, "Mr Whoopee")) return 423;
  401. else if (!strcmp(string, "BF Injection")) return 424;
  402. else if (!strcmp(string, "Hunter")) return 425;
  403. else if (!strcmp(string, "Premier")) return 426;
  404. else if (!strcmp(string, "Enforcer")) return 427;
  405. else if (!strcmp(string, "Securicar")) return 428;
  406. else if (!strcmp(string, "Banshee")) return 429;
  407. else if (!strcmp(string, "Predator")) return 430;
  408. else if (!strcmp(string, "Bus")) return 431;
  409. else if (!strcmp(string, "Rhino")) return 432;
  410. else if (!strcmp(string, "Barracks")) return 433;
  411. else if (!strcmp(string, "Hotknife")) return 434;
  412. else if (!strcmp(string, "Article Trailer")) return 435;
  413. else if (!strcmp(string, "Previon")) return 436;
  414. else if (!strcmp(string, "Coach")) return 437;
  415. else if (!strcmp(string, "Cabbie")) return 438;
  416. else if (!strcmp(string, "Stallion")) return 439;
  417. else if (!strcmp(string, "Rumpo")) return 440;
  418. else if (!strcmp(string, "RC Bandit")) return 441;
  419. else if (!strcmp(string, "Romero")) return 442;
  420. else if (!strcmp(string, "Packer")) return 443;
  421. else if (!strcmp(string, "Monster")) return 444;
  422. else if (!strcmp(string, "Admiral")) return 445;
  423. else if (!strcmp(string, "Squallo")) return 446;
  424. else if (!strcmp(string, "Seasparrow")) return 447;
  425. else if (!strcmp(string, "Pizzaboy")) return 448;
  426. else if (!strcmp(string, "Tram")) return 449;
  427. else if (!strcmp(string, "Article Trailer 2")) return 450;
  428. else if (!strcmp(string, "Turismo")) return 451;
  429. else if (!strcmp(string, "Speeder")) return 452;
  430. else if (!strcmp(string, "Reefer")) return 453;
  431. else if (!strcmp(string, "Tropic")) return 454;
  432. else if (!strcmp(string, "Flatbed")) return 455;
  433. else if (!strcmp(string, "Yankee")) return 456;
  434. else if (!strcmp(string, "Caddy")) return 457;
  435. else if (!strcmp(string, "Solair")) return 458;
  436. else if (!strcmp(string, "Berkley's RC Van")) return 459;
  437. else if (!strcmp(string, "Skimmer")) return 460;
  438. else if (!strcmp(string, "PCJ-600")) return 461;
  439. else if (!strcmp(string, "Faggio")) return 462;
  440. else if (!strcmp(string, "Freeway")) return 463;
  441. else if (!strcmp(string, "RC Baron")) return 464;
  442. else if (!strcmp(string, "RC Raider")) return 465;
  443. else if (!strcmp(string, "Glendale")) return 466;
  444. else if (!strcmp(string, "Oceanic")) return 467;
  445. else if (!strcmp(string, "Sanchez")) return 468;
  446. else if (!strcmp(string, "Sparrow")) return 469;
  447. else if (!strcmp(string, "Patriot")) return 470;
  448. else if (!strcmp(string, "Quad")) return 471;
  449. else if (!strcmp(string, "Coastguard")) return 472;
  450. else if (!strcmp(string, "Dinghy")) return 473;
  451. else if (!strcmp(string, "Hermes")) return 474;
  452. else if (!strcmp(string, "Sabre")) return 475;
  453. else if (!strcmp(string, "Rustler")) return 476;
  454. else if (!strcmp(string, "ZR-350")) return 477;
  455. else if (!strcmp(string, "Walton")) return 478;
  456. else if (!strcmp(string, "Regina")) return 479;
  457. else if (!strcmp(string, "Comet")) return 480;
  458. else if (!strcmp(string, "BMX")) return 481;
  459. else if (!strcmp(string, "Burrito")) return 482;
  460. else if (!strcmp(string, "Camper")) return 483;
  461. else if (!strcmp(string, "Marquis")) return 484;
  462. else if (!strcmp(string, "Baggage")) return 485;
  463. else if (!strcmp(string, "Dozer")) return 486;
  464. else if (!strcmp(string, "Maverick")) return 487;
  465. else if (!strcmp(string, "SAN News Maverick")) return 488;
  466. else if (!strcmp(string, "Rancher")) return 489;
  467. else if (!strcmp(string, "FBI Rancher")) return 490;
  468. else if (!strcmp(string, "Virgo")) return 491;
  469. else if (!strcmp(string, "Greenwood")) return 492;
  470. else if (!strcmp(string, "Jetmax")) return 493;
  471. else if (!strcmp(string, "Hotring Racer")) return 494;
  472. else if (!strcmp(string, "Sandking")) return 495;
  473. else if (!strcmp(string, "Blista Compact")) return 496;
  474. else if (!strcmp(string, "Police Maverick")) return 497;
  475. else if (!strcmp(string, "Boxville")) return 498;
  476. else if (!strcmp(string, "Benson")) return 499;
  477. else if (!strcmp(string, "Mesa")) return 500;
  478. else if (!strcmp(string, "RC Goblin")) return 501;
  479. else if (!strcmp(string, "Hotring Racer")) return 502;
  480. else if (!strcmp(string, "Hotring Racer")) return 503;
  481. else if (!strcmp(string, "Bloodring Banger")) return 504;
  482. else if (!strcmp(string, "Rancher")) return 505;
  483. else if (!strcmp(string, "Super GT")) return 506;
  484. else if (!strcmp(string, "Elegant")) return 507;
  485. else if (!strcmp(string, "Journey")) return 508;
  486. else if (!strcmp(string, "Bike")) return 509;
  487. else if (!strcmp(string, "Mountain Bike")) return 510;
  488. else if (!strcmp(string, "Beagle")) return 511;
  489. else if (!strcmp(string, "Cropduster")) return 512;
  490. else if (!strcmp(string, "Stuntplane")) return 513;
  491. else if (!strcmp(string, "Tanker")) return 514;
  492. else if (!strcmp(string, "Roadtrain")) return 515;
  493. else if (!strcmp(string, "Nebula")) return 516;
  494. else if (!strcmp(string, "Majestic")) return 517;
  495. else if (!strcmp(string, "Buccaneer")) return 518;
  496. else if (!strcmp(string, "Shamal")) return 519;
  497. else if (!strcmp(string, "Hydra")) return 520;
  498. else if (!strcmp(string, "FCR-900")) return 521;
  499. else if (!strcmp(string, "NRG-500")) return 522;
  500. else if (!strcmp(string, "HPV1000")) return 523;
  501. else if (!strcmp(string, "Cement Truck")) return 524;
  502. else if (!strcmp(string, "Towtruck")) return 525;
  503. else if (!strcmp(string, "Fortune")) return 526;
  504. else if (!strcmp(string, "Cadrona")) return 527;
  505. else if (!strcmp(string, "FBI Truck")) return 528;
  506. else if (!strcmp(string, "Willard")) return 529;
  507. else if (!strcmp(string, "Forklift")) return 530;
  508. else if (!strcmp(string, "Tractor")) return 531;
  509. else if (!strcmp(string, "Combine Harvester")) return 532;
  510. else if (!strcmp(string, "Feltzer")) return 533;
  511. else if (!strcmp(string, "Remington")) return 534;
  512. else if (!strcmp(string, "Slamvan")) return 535;
  513. else if (!strcmp(string, "Blade")) return 536;
  514. else if (!strcmp(string, "Freight (Train)")) return 537;
  515. else if (!strcmp(string, "Brownstreak (Train)")) return 538;
  516. else if (!strcmp(string, "Vortex")) return 539;
  517. else if (!strcmp(string, "Vincent")) return 540;
  518. else if (!strcmp(string, "Bullet")) return 541;
  519. else if (!strcmp(string, "Clover")) return 542;
  520. else if (!strcmp(string, "Sadler")) return 543;
  521. else if (!strcmp(string, "Firetruck LA")) return 544;
  522. else if (!strcmp(string, "Hustler")) return 545;
  523. else if (!strcmp(string, "Intruder")) return 546;
  524. else if (!strcmp(string, "Primo")) return 547;
  525. else if (!strcmp(string, "Cargobob")) return 548;
  526. else if (!strcmp(string, "Tampa")) return 549;
  527. else if (!strcmp(string, "Sunrise")) return 550;
  528. else if (!strcmp(string, "Merit")) return 551;
  529. else if (!strcmp(string, "Utility Van")) return 552;
  530. else if (!strcmp(string, "Nevada")) return 553;
  531. else if (!strcmp(string, "Yosemite")) return 554;
  532. else if (!strcmp(string, "Windsor")) return 555;
  533. else if (!strcmp(string, "Monster \"A\"")) return 556;
  534. else if (!strcmp(string, "Monster \"B\"")) return 557;
  535. else if (!strcmp(string, "Uranus")) return 558;
  536. else if (!strcmp(string, "Jester")) return 559;
  537. else if (!strcmp(string, "Sultan")) return 560;
  538. else if (!strcmp(string, "Stratum")) return 561;
  539. else if (!strcmp(string, "Elegy")) return 562;
  540. else if (!strcmp(string, "Raindance")) return 563;
  541. else if (!strcmp(string, "RC Tiger")) return 564;
  542. else if (!strcmp(string, "Flash")) return 565;
  543. else if (!strcmp(string, "Tahoma")) return 566;
  544. else if (!strcmp(string, "Savanna")) return 567;
  545. else if (!strcmp(string, "Bandito")) return 568;
  546. else if (!strcmp(string, "Freight Flat Trailer (Train)")) return 569;
  547. else if (!strcmp(string, "Streak Trailer (Train)")) return 570;
  548. else if (!strcmp(string, "Kart")) return 571;
  549. else if (!strcmp(string, "Mower")) return 572;
  550. else if (!strcmp(string, "Dune")) return 573;
  551. else if (!strcmp(string, "Sweeper")) return 574;
  552. else if (!strcmp(string, "Broadway")) return 575;
  553. else if (!strcmp(string, "Tornado")) return 576;
  554. else if (!strcmp(string, "AT400")) return 577;
  555. else if (!strcmp(string, "DFT-30")) return 578;
  556. else if (!strcmp(string, "Huntley")) return 579;
  557. else if (!strcmp(string, "Stafford")) return 580;
  558. else if (!strcmp(string, "BF-400")) return 581;
  559. else if (!strcmp(string, "Newsvan")) return 582;
  560. else if (!strcmp(string, "Tug")) return 583;
  561. else if (!strcmp(string, "Petrol Trailer")) return 584;
  562. else if (!strcmp(string, "Emperor")) return 585;
  563. else if (!strcmp(string, "Wayfarer")) return 586;
  564. else if (!strcmp(string, "Euros")) return 587;
  565. else if (!strcmp(string, "Hotdog")) return 588;
  566. else if (!strcmp(string, "Club")) return 589;
  567. else if (!strcmp(string, "Freight Box Trailer (Train)")) return 590;
  568. else if (!strcmp(string, "Article Trailer 3")) return 591;
  569. else if (!strcmp(string, "Andromada")) return 592;
  570. else if (!strcmp(string, "Dodo")) return 593;
  571. else if (!strcmp(string, "RC Cam")) return 594;
  572. else if (!strcmp(string, "Launch")) return 595;
  573. else if (!strcmp(string, "Police Car (LSPD)")) return 596;
  574. else if (!strcmp(string, "Police Car (SFPD)")) return 597;
  575. else if (!strcmp(string, "Police Car (LVPD)")) return 598;
  576. else if (!strcmp(string, "Police Ranger")) return 599;
  577. else if (!strcmp(string, "Picador")) return 600;
  578. else if (!strcmp(string, "S.W.A.T.")) return 601;
  579. else if (!strcmp(string, "Alpha")) return 602;
  580. else if (!strcmp(string, "Phoenix")) return 603;
  581. else if (!strcmp(string, "Glendale Shit")) return 604;
  582. else if (!strcmp(string, "Sadler Shit")) return 605;
  583. else if (!strcmp(string, "Baggage Trailer \"A\"")) return 606;
  584. else if (!strcmp(string, "Baggage Trailer \"B\"")) return 607;
  585. else if (!strcmp(string, "Tug Stairs Trailer")) return 608;
  586. else if (!strcmp(string, "Boxville")) return 609;
  587. else if (!strcmp(string, "Farm Trailer")) return 610;
  588. else if (!strcmp(string, "Utility Trailer")) return 611;
  589. return -1;
  590. }
  591.  
  592. // Fix the compiler crash when both the PAWN and Plugin versions of sscanf are
  593. // found by renaming the old version at declaration. (fixes.inc compatible
  594. // naming scheme: "BAD_Function()").
  595. #define sscanf(%0:...) BAD_sscanf(%0:...)
Advertisement
Add Comment
Please, Sign In to add comment