Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "..\..\script_macros.hpp"
- /*
- File: fn_vehicleGive.sqf
- Author: Deathblade
- Description:
- Check if not temp and transfer the vehicle ownership to another player.
- */
- private ["_vehiclesold","_destinationuid","_plaque","_sourceuid","_thread","_inInsured","_dbInfolist"];
- _vehiclesold = [_this,0,objNull,[objNull]] call BIS_fnc_param;
- _destinationuid = [_this,1,objNull,[objNull]] call BIS_fnc_param;
- _dbInfolist = _vehiclesold getVariable ["dbInfo",[]];
- if (count _dbInfolist > 0) then {
- _sourceuid = (_dbInfolist select 0);
- _plaque = (_dbInfolist select 1);
- _isInsured = (_dbInfolist select 2);
- };
- _query = format ["UPDATE vehicles SET pid='%1' WHERE plate='%2'",_destinationuid,_plaque];
- _query spawn
- {
- waitUntil {!DB_Async_Active};
- _thread = [_this,1] call DB_fnc_asyncCall;
- };
- _vehiclesold setVariable ["dbInfo",[_destinationuid,_plaque,_isInsured],true];
- life_action_inUse = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement