core.inc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. /*
  2. _____ _ _ _ _
  3. |_ _| | | | | | | (_)
  4. | | _ __ | |_ _ __ ___ __| |_ _ ___| |_ _ ___ _ __
  5. | | | '_ \| __| '__/ _ \ / _` | | | |/ __| __| |/ _ \| '_ \
  6. _| |_| | | | |_| | | (_) | (_| | |_| | (__| |_| | (_) | | | |
  7. |_____|_| |_|\__|_| \___/ \__,_|\__,_|\___|\__|_|\___/|_| |_|
  8. This is the system for player owned vehicles.
  9. Related files are in /gamemodes/inc/vehicles.
  10. -> ./commands/players.inc ~ has all player owned vehicle commands.
  11. command related variables are here too!
  12. -> ./commands/admin.inc ~ has all administrator commands
  13. -> ./commands/impound.inc ~ impound related commands.
  14. It's important to note: only the player's spawned vehicle will be saved.
  15. What's in this file?:
  16. Structure,
  17. • definitions & variables
  18. Saving,
  19. • savePlayerVehicle( index )
  20. Loading,
  21. • loadPlayerVehicles()
  22. • setupPlayerVehicles()
  23. Spawning,
  24. • spawnPlayerVehicle( index )
  25. Despawning,
  26. • destroyPlayerVehicle( index )
  27. Creating,
  28. • createPlayerVehicle( playerid, slot, model, x, y, z, rz )
  29. Useful functions
  30. • SetVehicleAlarmState ( vehicleid ), SetVehicleEngineState( vehicleid ), SetVehicleLockState( vehicleid )
  31. */
  32. /*
  33. ===================================================
  34. _____ _ _
  35. / ____| | | |
  36. | (___ | |_ _ __ _ _ ___| |_ _ _ _ __ ___
  37. \___ \| __| '__| | | |/ __| __| | | | '__/ _ \
  38. ____) | |_| | | |_| | (__| |_| |_| | | | __/
  39. |_____/ \__|_| \__,_|\___|\__|\__,_|_| \___|
  40. Definitions & variables
  41. ===================================================
  42. */
  43. //custom color for new systems
  44. #define COLOR_VEHICLES 0xFFB76FFF
  45. #define MAX_SPAWNED_VEHICLES 1
  46. //Structure of each vehicle.
  47. enum pvehicleDatav {
  48. pvID, //Array index
  49. pvspawned, //Vehicles can be loaded, but not spawned
  50. pvSQLID, //SQL ID of the vehicle in the DB.
  51. pvpID, //Related player SQL ID.
  52. pvmodel,
  53. Float:pvx,
  54. Float:pvy,
  55. Float:pvz,
  56. Float:pvrz,
  57. pvcolor1,
  58. pvcolor2,
  59. pvpaintjob,
  60. pvlocked,
  61. pvgas,
  62. Float:pvdamage,
  63. //parking & towing
  64. Float:pvparkx,
  65. Float:pvparky,
  66. Float:pvparkz,
  67. Float:pvparkrz,
  68. //impound system
  69. pvimpounded,
  70. //upgrades
  71. pvgps,
  72. pvalarm,
  73. pvinsurance,
  74. pvsparekey,
  75. pvplate[9],
  76. //trunk stuff
  77. pvGun1,
  78. pvGun2,
  79. pvPot,
  80. pvCrack,
  81. Float:pvArmor,
  82. //damage
  83. pvdpanels,
  84. pvddoors,
  85. pvdlights,
  86. pvdtires,
  87. //mod shop stuff
  88. pvcomponents[14],
  89. pvvw
  90. }
  91. //Stores all vehicle data.
  92. new PlayerVehicles[MAX_PLAYERS][MAX_VEHICLE_SLOTS][pvehicleDatav];
  93. //Stores the last SQL ID (auto increment)
  94. new lastvehSQLID;
  95. //stores current spawned vehicle
  96. new playerSpawnedVehicle[MAX_PLAYERS] = {-1,...};
  97. //vupgrade misc
  98. new spareKeys[MAX_PLAYERS] = -1;
  99. new spareKeysSlot[MAX_PLAYERS] = -1;
  100. new hasgivenKey[MAX_PLAYERS];
  101. /*
  102. ======================================================
  103. _ _ _
  104. | | | (_)
  105. | | ___ __ _ __| |_ _ __ __ _
  106. | | / _ \ / _` |/ _` | | '_ \ / _` |
  107. | |___| (_) | (_| | (_| | | | | | (_| |
  108. |______\___/ \__,_|\__,_|_|_| |_|\__, |
  109. __/ |
  110. |___/
  111. Loads all vehicle data at once.
  112. =====================================================
  113. */
  114. //fetch the last "ID" of auto increment from playervehicles on GamemodeInit
  115. fetchLastSQLID() {
  116. mysql_pquery( sqlGameConnection, "SELECT ID FROM playervehicles ORDER BY ID DESC LIMIT 1;", "SetLastSQLID" );
  117. return 1;
  118. }
  119. forward SetLastSQLID();
  120. public SetLastSQLID() {
  121. if( cache_num_rows() < 1 ) lastvehSQLID = 0; //this assumes the table's auto increment starts at 0
  122. lastvehSQLID = cache_get_field_content_int( 0, "ID" );
  123. return 1;
  124. }
  125. //Request the data
  126. loadPlayerVehicles( playerid ) {
  127. new query[130];
  128. mysql_format( sqlGameConnection, query, sizeof(query), "SELECT * FROM playervehicles WHERE pID = %d;", PlayerInfo[playerid][pID] );
  129. mysql_pquery( sqlGameConnection, query, "setupPlayerVehicles", "i", playerid );
  130. return 1;
  131. }
  132. //Collect & process the data
  133. forward setupPlayerVehicles(playerid);
  134. public setupPlayerVehicles(playerid) {
  135. if( cache_get_row_count() < 1 ) {
  136. return 1;
  137. }
  138. for( new slot; slot < cache_get_row_count(); slot++ ) {
  139. //player has no more car slots
  140. if( slot >= PlayerInfo[playerid][pMaxCarSlots] ) {
  141. break;
  142. }
  143. #define veh(%1) PlayerVehicles[playerid][slot][pv%1]
  144. veh(SQLID) = cache_get_field_content_int( slot, "ID" );
  145. veh(pID) = cache_get_field_content_int( slot, "pID" );
  146. veh(model) = cache_get_field_content_int( slot, "model" );
  147. veh(x) = cache_get_field_content_float( slot, "x" );
  148. veh(y) = cache_get_field_content_float( slot, "y" );
  149. veh(z) = cache_get_field_content_float( slot, "z" );
  150. veh(rz) = cache_get_field_content_float( slot, "rz" );
  151. veh(locked) = cache_get_field_content_int( slot, "locked" );
  152. veh(color1) = cache_get_field_content_int( slot, "color1" );
  153. veh(color2) = cache_get_field_content_int( slot, "color2" );
  154. veh(paintjob) = cache_get_field_content_int( slot, "paintjob" );
  155. veh(gas) = cache_get_field_content_int( slot, "gas" );
  156. veh(damage) = cache_get_field_content_float( slot, "damage" );
  157. //parking & towing;
  158. veh(parkx) = cache_get_field_content_float( slot, "parkx" );
  159. veh(parky) = cache_get_field_content_float( slot, "parky" );
  160. veh(parkz) = cache_get_field_content_float( slot, "parkz" );
  161. veh(parkrz) = cache_get_field_content_float( slot, "parkrz" );
  162. //upgrades
  163. veh(gps) = cache_get_field_content_int( slot, "gps" );
  164. veh(insurance) = cache_get_field_content_int( slot, "insurance" );
  165. veh(alarm) = cache_get_field_content_int( slot, "alarm" );
  166. veh(sparekey) = cache_get_field_content_int( slot, "sparekey" );
  167. cache_get_field_content( slot, "plate", veh(plate), sqlGameConnection, 9 );
  168. //trunk
  169. veh(Gun1) = cache_get_field_content_int( slot, "Gun1" );
  170. veh(Gun2) = cache_get_field_content_int( slot, "Gun2" );
  171. veh(Pot) = cache_get_field_content_int( slot, "Pot" );
  172. veh(Crack) = cache_get_field_content_int( slot, "Crack" );
  173. veh(Armor) = cache_get_field_content_int( slot, "Armor" );
  174. veh(dpanels) = cache_get_field_content_int( slot, "dpanels" );
  175. veh(ddoors) = cache_get_field_content_int( slot, "ddoors" );
  176. veh(dlights) = cache_get_field_content_int( slot, "dlights" );
  177. veh(dtires) = cache_get_field_content_int( slot, "dtires" );
  178. veh(impounded) = cache_get_field_content_int( slot, "impounded" );
  179. //get vehicle component data
  180. new compstr[50];
  181. for( new c; c < 14; c++ ) {
  182. format( compstr, 50, "component%d", c );
  183. veh(components)[c] = cache_get_field_content_int( slot, compstr );
  184. }
  185. //spawn the last vehicle the player had
  186. if( PlayerInfo[playerid][lastCarID] > -1 ) {
  187. if( PlayerInfo[playerid][lastCarID] == veh(SQLID) ) {
  188. spawnPlayerVehicle( playerid, slot, 1 ); //1: spawns in last position, than last parked
  189. }
  190. }
  191. #undef veh
  192. }
  193. return 1;
  194. }
  195. /*
  196. ====================================
  197. _____ _
  198. / ____| (_)
  199. | (___ __ ___ ___ _ __ __ _
  200. \___ \ / _` \ \ / / | '_ \ / _` |
  201. ____) | (_| |\ V /| | | | | (_| |
  202. |_____/ \__,_| \_/ |_|_| |_|\__, |
  203. __/ |
  204. |___/
  205. Save all vehicles, or save one vehicle.
  206. =====================================
  207. */
  208. //Save a single vehicle
  209. savePlayerVehicle( playerid, slot ) {
  210. new query[1000];
  211. #define veh(%1) PlayerVehicles[playerid][slot][pv%1]
  212. if( !veh(spawned) || !IsValidVehicle( veh(ID) ) ) return 1; //else negative arrays
  213. //get trunk data to save
  214. GetVehicleHealth( veh(ID), veh(damage) );
  215. GetVehiclePos( veh(ID), veh(x), veh(y), veh(z) );
  216. GetVehicleZAngle( veh(ID), veh(rz) );
  217. veh(vw) = GetVehicleVirtualWorld( veh(ID) );
  218. veh(Gun1) = TrunkInfo[veh(ID)][cGun1];
  219. veh(Gun2) = TrunkInfo[veh(ID)][cGun2];
  220. veh(Pot) = TrunkInfo[veh(ID)][cCannabis];
  221. veh(Crack) = TrunkInfo[veh(ID)][cCocaine];
  222. veh(Armor) = TrunkInfo[veh(ID)][cArmor];
  223. GetVehicleDamageStatus( veh(ID), veh(dpanels), veh(ddoors), veh(dlights), veh(dtires) );
  224. veh(gas) = Gas[veh(ID)];
  225. mysql_format( sqlGameConnection, query, sizeof( query ), "UPDATE playervehicles SET pID = %d, model = %d, x = %f, y = %f, z = %f, rz = %f, locked = %d,",
  226. veh(pID), veh(model), veh(x), veh(y), veh(z), veh(rz), veh(locked) );
  227. mysql_format( sqlGameConnection, query, sizeof( query ), "%s color1 = %d, color2 = %d, paintjob = %d, gas = %d, damage = %f, gps = %d, alarm = %d, sparekey = %d, insurance = %d, plate = '%e',",
  228. query, veh(color1), veh(color2), veh(paintjob), veh(gas), veh(damage), veh(gps), veh(alarm), veh(sparekey), veh(insurance), veh(plate) );
  229. mysql_format( sqlGameConnection, query, sizeof( query ), "%s Gun1 = %d, Gun2 = %d, Pot = %d, Crack = %d, Armor = %f, parkx = %f, parky = %f, parkz = %f, parkrz = %f,",
  230. query, veh(Gun1), veh(Gun2), veh(Pot), veh(Crack), veh(Armor), veh(parkx), veh(parky), veh(parkz), veh(parkrz) );
  231. mysql_format( sqlGameConnection, query, sizeof( query ), "%s dpanels = %d, ddoors = %d, dlights = %d, dtires = %d, vw = %d, impounded = %d",
  232. query, veh(dpanels), veh(ddoors), veh(dlights), veh(dtires), veh(vw), veh(impounded) );
  233. //get vehicle component data
  234. for( new c; c < 14; c++ ) {
  235. PlayerVehicles[playerid][slot][pvcomponents][c] = GetVehicleComponentInSlot( veh(ID), c );
  236. mysql_format( sqlGameConnection, query, sizeof( query ), "%s, component%d = %d", query, c, PlayerVehicles[playerid][slot][pvcomponents][c] );
  237. }
  238. mysql_format( sqlGameConnection, query, sizeof( query ), "%s WHERE ID = %d;", query, veh(SQLID) );
  239. mysql_pquery( sqlGameConnection, query ); //Want to save this in the main thread before the client closes connection
  240. #undef veh
  241. return 1;
  242. }
  243. /*
  244. ====================================================
  245. _____ _
  246. / ____| (_)
  247. | (___ _ __ __ ___ ___ __ _ _ __ __ _
  248. \___ \| '_ \ / _` \ \ /\ / / '_ \| | '_ \ / _` |
  249. ____) | |_) | (_| |\ V V /| | | | | | | | (_| |
  250. |_____/| .__/ \__,_| \_/\_/ |_| |_|_|_| |_|\__, |
  251. | | __/ |
  252. |_| |___/
  253. Spawn both of the player's vehicle, or spawn one
  254. based on its ~index~.
  255. ====================================================
  256. */
  257. //Spawn a single player vehicle
  258. spawnPlayerVehicle( playerid, slot, lastpos = 0 ) {
  259. #define veh(%1) PlayerVehicles[playerid][slot][pv%1] //This is just a marco to reduce repetition!
  260. if( veh(SQLID) < 1 ) return 1; //no vehicle exists in slot
  261. //If it hasn't already been spawned...
  262. if( !veh(spawned) && !veh(impounded) ) {
  263. playerSpawnedVehicle[playerid] = slot;
  264. if( !lastpos ) {
  265. veh(ID) = CreateVehicle( veh(model), veh(parkx), veh(parky), veh(parkz), veh(parkrz), veh(color1), veh(color2), -1 );
  266. }
  267. else {
  268. veh(ID) = CreateVehicle( veh(model), veh(x), veh(y), veh(z), veh(rz), veh(color1), veh(color2), -1 );
  269. }
  270. SetVehicleVirtualWorld( veh(ID), veh(vw) );
  271. SetVehicleNumberPlate( veh(ID), veh(plate) );
  272. SetVehicleLockState( veh(ID), veh(locked) );
  273. if( IsABicycle( veh(ID) ) ) engineOn[veh(ID)] = 1; //set engine vars off
  274. SetVehicleEngineState( veh(ID), engineOn[veh(ID)] );
  275. playerDisabledEngine[veh(ID)] = 1;
  276. //set the trunk items
  277. TrunkInfo[veh(ID)][cGun1] = veh(Gun1);
  278. TrunkInfo[veh(ID)][cGun2] = veh(Gun2);
  279. TrunkInfo[veh(ID)][cCannabis] = veh(Pot);
  280. TrunkInfo[veh(ID)][cCocaine] = veh(Crack);
  281. TrunkInfo[veh(ID)][cArmor] = veh(Armor);
  282. //set component info
  283. //get vehicle component data
  284. for( new c; c < 14; c++ ) {
  285. if( veh(components)[c] ) {
  286. AddVehicleComponent( veh(ID), veh(components)[c] );
  287. }
  288. }
  289. veh(spawned) = 1;
  290. //totalled state
  291. if( veh(damage) < 300.0 ) {
  292. SetVehicleEngineState( veh(ID), 0 );
  293. veh(damage) = 305.0;
  294. }
  295. //set the damage/gas
  296. UpdateVehicleDamageStatus( veh(ID), veh(dpanels), veh(ddoors), veh(dlights), veh(dtires) );
  297. SetVehicleHealth( veh(ID), veh(damage) );
  298. ChangeVehiclePaintjob( veh(ID), veh(paintjob) );
  299. Gas[veh(ID)] = veh(gas);
  300. }
  301. #undef veh
  302. return 1;
  303. }
  304. GetPlayerSpawnedVehicleSlot( playerid ) {
  305. return playerSpawnedVehicle[playerid];
  306. }
  307. /*
  308. ==============================================================
  309. _____ _
  310. | __ \ (_)
  311. | | | | ___ ___ _ __ __ ___ ___ __ _ _ __ __ _
  312. | | | |/ _ \/ __| '_ \ / _` \ \ /\ / / '_ \| | '_ \ / _` |
  313. | |__| | __/\__ \ |_) | (_| |\ V V /| | | | | | | | (_| |
  314. |_____/ \___||___/ .__/ \__,_| \_/\_/ |_| |_|_|_| |_|\__, |
  315. | | __/ |
  316. |_| |___/
  317. Saves, resets trunk data for the vehicle ID,
  318. and destroys the vehicle.
  319. ==============================================================
  320. */
  321. destroyPlayerVehicle( playerid, slot ) {
  322. #define veh(%1) PlayerVehicles[playerid][slot][pv%1]
  323. if( veh(spawned) ) {
  324. //save the vehicle first
  325. savePlayerVehicle( playerid, slot );
  326. TrunkInfo[veh(ID)][cGun1] = 0;
  327. TrunkInfo[veh(ID)][cGun2] = 0;
  328. TrunkInfo[veh(ID)][cCannabis] = 0;
  329. TrunkInfo[veh(ID)][cCocaine] = 0;
  330. TrunkInfo[veh(ID)][cArmor] = 0;
  331. TrunkInfo[veh(ID)][cFoodtray] = 0;
  332. if(Neon[veh(ID)]) { DestroyDynamicObjectEx(Neon[veh(ID)]); Neon[veh(ID)] = 0; } //destroy neons
  333. if(Neon2[veh(ID)]) { DestroyDynamicObjectEx(Neon2[veh(ID)]); Neon2[veh(ID)] = 0; }
  334. if(Neon3[veh(ID)]) { DestroyDynamicObjectEx(Neon3[veh(ID)]); Neon3[veh(ID)] = 0; }
  335. if(Neon4[veh(ID)]) { DestroyDynamicObjectEx(Neon4[veh(ID)]); Neon4[veh(ID)] = 0; }
  336. if(TaxiSign[veh(ID)]) { DestroyDynamicObjectEx(TaxiSign[veh(ID)]); TaxiSign[veh(ID)] = 0; } //destroy taxi sign
  337. if(SirenObject[veh(ID)]) //destroy siren
  338. {
  339. DestroyDynamicObjectEx(SirenObject[veh(ID)]);
  340. Siren[veh(ID)] = 0;
  341. SirenObject[veh(ID)] = 0;
  342. }
  343. //get damage states
  344. GetVehicleDamageStatus( veh(ID), veh(dpanels), veh(ddoors), veh(dlights), veh(dtires) );
  345. //Get last position
  346. GetVehiclePos( veh(ID), veh(x), veh(y), veh(z) );
  347. GetVehicleZAngle( veh(ID), veh(rz) );
  348. //reset params for this vehicle ID
  349. SetVehicleParamsEx( veh(ID), 0, 0, 0, 0, 0, 0, 0 );
  350. DestroyVehicle( veh(ID) );
  351. veh(spawned) = 0;
  352. veh(ID) = INVALID_VEHICLE_ID;
  353. playerSpawnedVehicle[playerid] = -1;
  354. for( new i; i < GetPlayerPoolSize(); i++ ) {
  355. if( spareKeys[i] == playerid ) {
  356. spareKeys[i] = -1;
  357. spareKeysSlot[i] = -1;
  358. }
  359. }
  360. hasgivenKey[playerid] = 0;
  361. return 1;
  362. }
  363. #undef veh
  364. return 0;
  365. }
  366. /*
  367. ========================================================
  368. _____ _ _
  369. / ____| | | (_)
  370. | | _ __ ___ __ _| |_ _ _ __ __ _
  371. | | | '__/ _ \/ _` | __| | '_ \ / _` |
  372. | |____| | | __/ (_| | |_| | | | | (_| |
  373. \_____|_| \___|\__,_|\__|_|_| |_|\__, |
  374. __/ |
  375. |___/
  376. Creates a vehicle given the player it's being
  377. created for, and the player's vehicle slot (
  378. given the vehicle slot is free).
  379. =======================================================
  380. */
  381. //Give the player a vehicle.
  382. createPlayerVehicle( playerid, slot, model, Float:x, Float:y, Float:z, Float:rz, col1 = -1, col2 = -1 ) {
  383. lastvehSQLID++;
  384. #define veh(%1) PlayerVehicles[playerid][slot][pv%1]
  385. //Reset the variables first
  386. ResetPlayerVehicleSlot( playerid, slot );
  387. //These are most important
  388. //veh(SQLID) = lastvehSQLID;
  389. veh(pID) = PlayerInfo[playerid][pID];
  390. veh(model) = model;
  391. veh(parkx) = x;
  392. veh(parky) = y;
  393. veh(parkz) = z;
  394. veh(parkrz) = rz;
  395. veh(gas) = 100;
  396. veh(damage) = 1000;
  397. if( col1 == -1 ) {
  398. col1 = random(255);
  399. }
  400. if( col2 == -1 ) {
  401. col2 = random(255);
  402. }
  403. veh(color1) = col1;
  404. veh(color2) = col2;
  405. veh(paintjob) = 3;
  406. GenerateRandomPlate( playerid, slot );
  407. new
  408. query[500];
  409. mysql_format( sqlGameConnection, query, sizeof( query ), "INSERT INTO playervehicles SET pID = %d, model = %d, parkx = %f, parky = %f, parkz = %f, parkrz = %f, locked = 0, color1 = 0, color2 = 0, damage=1000, gas=100, plate = '%e'", PlayerInfo[playerid][pID], model, x, y, z, rz, veh(plate) );
  410. mysql_query(sqlGameConnection, query);
  411. mysql_format(sqlGameConnection, query, sizeof(query), "SELECT * FROM playervehicles WHERE pID = %d ORDER BY ID DESC LIMIT 1", PlayerInfo[playerid][pID]);
  412. new Cache:result;
  413. result = mysql_query(sqlGameConnection, query);
  414. if( cache_num_rows() < 1 ) {
  415. printf("Deleted car slot %i from %s", slot, PlayerOOCName(playerid));
  416. ResetPlayerVehicleSlot( playerid, slot );
  417. cache_delete(result);
  418. return 1;
  419. }
  420. printf("assigned car to %s in slot %i", PlayerOOCName(playerid), slot);
  421. veh(SQLID) = cache_get_field_content_int( 0, "ID" );
  422. #undef veh
  423. cache_delete(result);
  424. return 1;
  425. }
  426. //=======[ PERMANENTLY DELETING ]=======
  427. ResetPlayerVehicleSlot( playerid, slot ) {
  428. #define veh(%0) PlayerVehicles[playerid][slot][pv%0]
  429. if( veh(spawned) ) {
  430. destroyPlayerVehicle( playerid, slot );
  431. }
  432. if( veh(SQLID) > 0 ) {
  433. new query[100];
  434. mysql_format( sqlGameConnection, query, sizeof( query ), "DELETE FROM playervehicles WHERE ID = %d;", veh(SQLID) );
  435. mysql_pquery( sqlGameConnection, query );
  436. }
  437. for( new i; pvehicleDatav:i < pvehicleDatav; i++ ) {
  438. PlayerVehicles[playerid][slot][pvehicleDatav:i] = 0;
  439. }
  440. #undef veh
  441. return 1;
  442. }
  443. //Trunk info
  444. /*
  445. enum ca_Info
  446. {
  447. c_ID,
  448. c_Model,
  449. Float:c_ParkPos[4],
  450. Float:c_LastPos[4],
  451. c_Component[14],
  452. c_Color[2],
  453. c_PaintJob,
  454. c_Alarm,
  455. c_Insurance,
  456. c_Plate[10],
  457. c_GPS,
  458. c_Tow,
  459. c_Keys,
  460. c_Lock,
  461. c_Price,
  462. c_Trunk,
  463. c_Gun[2],
  464. c_Pot,
  465. c_Crack,
  466. Float:c_Armor,
  467. c_VW,
  468. c_Impounded
  469. };
  470. */
  471. #include "inc\vehicles\useful.inc"
  472. #include "inc\vehicles\commands\player.inc"
  473. #include "inc\vehicles\commands\admin.inc"
  474. #include "inc\vehicles\commands\impound.inc"
  475. #include "inc\vehicles\hooks.inc"
  476. //#include "../gamemodes/inc/trunk.inc"