Advertisement
Guest User

fn_insertVehicle.sqf

a guest
Aug 8th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 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"
  16. ];
  17.  
  18. //Stop bad data being passed.
  19. if (_uid isEqualTo "" || _side isEqualTo "" || _type isEqualTo "" || _className isEqualTo "" || _color isEqualTo -1 || _plate isEqualTo "") 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];
  22.  
  23.  
  24. [_query,1] call DB_fnc_asyncCall;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement