friquentin

Untitled

Jun 29th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 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, immatriculation) VALUES ('%1', '%2', '%3', '%4', '1','1','""[[],0]""', '%5', '%6','""[]""','""[]""'','""0""')",_side,_className,_type,_uid,_color,_plate];
  22.  
  23.  
  24. [_query,1] call DB_fnc_asyncCall;
Advertisement
Add Comment
Please, Sign In to add comment