Advertisement
TheMisticogamer

Untitled

Feb 7th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. /*
  2. File: fn_insertVehicle.sqf
  3. Author: Bryan "Tonic" Boardwine
  4.  
  5. Description:
  6. Inserts the vehicle into the database
  7. */
  8. private ["_query","_sql"];
  9. params [
  10. "_uid",
  11. "_side",
  12. "_type",
  13. "_className",
  14. ["_color",-1,[0]],
  15. ["_plate",-1,[0]]
  16. ];
  17.  
  18. //Stop bad data being passed.
  19. if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo -1) exitWith {};
  20.  
  21. _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""')",_side,_className,_type,_uid,_color,_plate]; remplacez-la par celle-ci : _query = format ["INSERT INTO vehicles (side, classname, type, pid, alive, active, inventory, color, plate, gear, damage, immatriculation) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""','%5','%6','""[]""','""[]""','""%7""')",_side,_className,_type,_uid,_color,_pla te,_immatriculation];
  22.  
  23.  
  24. [_query,1] call DB_fnc_asyncCall;
  25.  
  26. _immatriculation = format ['%1%2%3%4%5%6%7', toString [65 + random 25], toString [65 + random 25], round (random 9), round (random 9), round (random 9), toString [65 + random 25], toString [65 + random 25]]; _vehicle setVariable ["vehicle_info_plate",_immatriculation,true]; _vehicle setVariable ["vehicle_info_vid",0,true];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement