-
Posts
1706 -
Joined
-
Last visited
-
Days Won
14
Content Type
Profiles
Forums
Articles
Posts posted by cen
-
-
Got it!Code:
/*** Created by 0verHeaT ***/
private ["_Missing","_index","_SpawnPats","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"];
_index = _this select 0;
if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]};
_veh = VehStoredList select _index;
_vehicle = _veh select 0;
_key = _veh select 1;
_Missing = "";
_vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");
if (_vehicle select 0 isKindOf 'Air') then {
_SpawnPats = ["Sr_border"];
_Missing = "Helipad";
} else {
_SpawnPats = ["PARACHUTE_TARGET"];
_Missing = "Parking Lot";
};
_helipadsnear = nearestObjects [(getPosATL player),_SpawnPats,50];
if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a "+_Missing+"! Right click on your Toolbox to build one!","PLAIN DOWN"]};
_nearestpad = _helipadsnear select 0;
_position = getPosATL _nearestpad;
_checkkey = [player,_key] call BIS_fnc_invAdd;
if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]};
_sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"];
_sign setPos _position;
PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage];
publicVariableServer "PVDZE_veh_spawn";
cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"];
sleep 2;
call garage_getnearVeh;
call garage_getstoredVeh;EDIT: I lied.
First one (very top) spawned fine, and the other two... well... as you can see:
-
Doesn't work for me. Vehicle doesn't get DB coords.
Code I'm using:
/*** Created by 0verHeaT ***/
private ["_Missing","_index","_SpawnPats","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"];
_index = _this select 0;
if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]};
_veh = VehStoredList select _index;
_vehicle = _veh select 0;
_key = _veh select 1;
_Missing = "";
_vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");
if (_vehicle select 0 isKindOf 'Air') then {
_SpawnPats = ["Sr_border"];
_Missing = "Helipad";
} else {
_SpawnPats = ["PARACHUTE_TARGET"];
_Missing = "Parking Lot";
};
_helipadsnear = nearestObjects [(getPosATL player),_SpawnPats,50];
if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a "+_Missing+"! Right click on your Toolbox to build one!","PLAIN DOWN"]};
_nearestpad = _helipadsnear select 0;
_position = getPosATL _nearestpad;
_position = [_location select 0, _location select 1, _location select 2 + 0.2];
_checkkey = [player,_key] call BIS_fnc_invAdd;
if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]};
_sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"];
_sign setPos _position;
PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage];
publicVariableServer "PVDZE_veh_spawn";
cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"];
sleep 2;
call garage_getnearVeh;
call garage_getstoredVeh; -
-
And you used the whole code, without blindly copy + pasting? ^^
Yup used your entire code and it tells me there isn't a helipad within 30m.
-
Hi,
so if you placed a heli pad under or above the metal floor (which is the same as under the metal floor, because it'll allways be painted on ground), then it's pretty Normal, that the Heli can't spawn there, as there is no space. it will find the best suitable position, which in that case is 30m above that metal floor.
If you add the Metal Floor to this:
_helipads = ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army","MAP_Heli_H_cross"];
<SNIP>
Tried this UK and it didn't even spawn the vehicle :D
-
try chaning this line
_position = getPosATL _nearestpad;
into this:
_position = getPos _nearestpad;
Tried this and the heli spawns underneath the metal floors/object still:
-
The vanilla spawn vehicle isn't used though is it?
The script uses this code to spawn the vehicle:
https://github.com/0verHeaT/VehicleGarage/blob/master/Garage/garage_spawnvehicle.sqf
-
Arma 2 drones. Sweetness!
- LunatikCH and Brian Soanes
-
2
-
Exactly! I can't seem to find where it is choosing the spawn height.
-
But can you place an object in the air so that the vehicle will spawn there. Like the 2nd story or roof of a base.
-
I can use another object as a spawn "marker" for the vehicle, but I can't find what is choosing the position of the vehicle in the code.
Here's the spawn vehicle code:
/*** Created by 0verHeaT ***/
private ["_index","_helipads","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"];
_index = _this select 0;
if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]};
_veh = VehStoredList select _index;
_vehicle = _veh select 0;
_key = _veh select 1;
_vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");
_helipads = ["HeliH","HeliHCivil","HeliHRescue","MAP_Heli_H_army","MAP_Heli_H_cross"];
_helipadsnear = nearestObjects [(getPosATL player),_helipads,50];
if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a Helipad! Right click on your Toolbox to build one!","PLAIN DOWN"]};
_nearestpad = _helipadsnear select 0;
_position = getPosATL _nearestpad;
_checkkey = [player,_key] call BIS_fnc_invAdd;
if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]};
_sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"];
PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage];
publicVariableServer "PVDZE_veh_spawn";
cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"];
sleep 2;
call garage_getnearVeh;
call garage_getstoredVeh; -
Yea I tried to use a different object other than heli pad, but when I place the object in the air, the vehicle spawns above it like 30m in the air lol
-
Anyone able to spawn the helipad in the air and get the vehicles to spawn there? Think raised heli storage on a base.
-
/* Set Damage on all other objects */ UPDATE `object_data` SET `Damage`=0.2 WHERE `ObjectUID` <> 0 AND `CharacterID` <> 0 AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND ( (`Inventory` IS NULL) OR (`Inventory` = '[]') ); /* Set Damage On Doors/Plot Poles using Door Management via Age */ UPDATE `object_data` SET `Damage`=0.2 WHERE `Classname` IN ('Plastic_Pole_EP1_DZ','CinderWallDoorSmallLocked_DZ','CinderWallDoorLocked_DZ','CinderWallSmallDoorway_DZ','CinderWallDoorway_DZ','Land_DZE_WoodDoorLocked','CinderWallDoor_DZ','CinderWallDoorSmall_DZ','Land_DZE_WoodDoor','Land_DZE_GarageWoodDoor','Land_DZE_GarageWoodDoorLocked','Land_DZE_LargeWoodDoorLocked','Land_DZE_LargeWoodDoor','WoodLargeWallDoor_DZ') AND `Datestamp` < DATE_SUB(CURRENT_TIMESTAMP, INTERVAL 3 DAY) AND `Inventory` != '[]';
-
North East West Central
-
Hero humanity is on top, bandit on bottom, so should work since the top is done by epoch devs :D
if (!_punishment) then { //i'm "not guilty" - kill me && be punished _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000; _humanityHit = -(2000 - _myKills); _kills = _source getVariable ["humanKills",0]; _source setVariable ["humanKills",(_kills + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; } else { //i'm "guilty" - kill me as bandit //_killsV = _source getVariable ["banditKills",0]; //_source setVariable ["banditKills",(_killsV + 1),true]; _myKillsB = ((player getVariable ["banditKills",0]) / 30) * 1000; _humanityHit = (2000 + _myKillsB); _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; };
-
-
Why wouldn't you have a vehicle trader? I've got 4 different vehicle traders on my servers. They include civilian vehicle unarmed and armed and military vehicles armed and unarmed. Different humanity requirements to buy and sell to each of them except the civilian unarmed vehicles.
Someone help this guy out, he's completely lost :D
-
How did Epoch 0252 manage to run everything fine? Hmmmmmmn
Same way Epoch 1.0.4.2 was the best version :D
-
Find Vehicle Function - FindVehicleKeysCount:
BEGIN
DECLARE totalKeys INT DEFAULT 0;
DECLARE keyName VARCHAR(32) DEFAULT "";
DECLARE keysInChar INT DEFAULT 0;
DECLARE keysInObj INT DEFAULT 0;
SET keyName = (CASE
WHEN `keyId` < 2501 THEN CONCAT('ItemKeyGreen', `keyId`)
WHEN `keyId` < 5001 THEN CONCAT('ItemKeyRed', `keyId` - 2500)
WHEN `keyId` < 7501 THEN CONCAT('ItemKeyBlue', `keyId` - 5000)
WHEN `keyId` < 10001 THEN CONCAT('ItemKeyYellow', `keyId` - 7500)
WHEN `keyId` < 12501 THEN CONCAT('ItemKeyBlack', `keyId` - 10000)
ELSE 'ERROR'
END);
SET keysInChar = (SELECT COUNT(*) FROM `Character_DATA` WHERE `Alive` = '1' AND (`Inventory` LIKE CONCAT('%', keyName, '%') OR `Backpack` LIKE CONCAT('%', keyName, '%')));
SET keysInObj = (SELECT COUNT(*) FROM `Object_DATA` WHERE `Inventory` LIKE CONCAT('%', keyName, '%'));
RETURN (keysInChar + keysInObj);
ENDDelete Function - DeleteNonKeyVehicles (I changed it to unlock instead of delete:
BEGIN
UPDATE `object_data`
SET `CharacterID` = 0
WHERE
`object_data`.`CharacterID` <> 0
AND `Object_DATA`.`CharacterID` <= 12500
AND `Object_DATA`.`Classname` NOT LIKE 'Tent%'
AND `Object_DATA`.`Classname` NOT LIKE '%Locked'
AND `Object_DATA`.`Classname` NOT LIKE 'Land%'
AND `Object_DATA`.`Classname` NOT LIKE 'Cinder%'
AND `Object_DATA`.`Classname` NOT LIKE 'Wood%'
AND `Object_DATA`.`Classname` NOT LIKE 'Metal%'
AND `Object_DATA`.`Classname` NOT LIKE '%Storage%'
AND `Object_DATA`.`Classname` NOT IN ('OutHouse_DZ', 'GunRack_DZ', 'WorkBench_DZ', 'Sandbag1_DZ', 'FireBarrel_DZ', 'DesertCamoNet_DZ', 'StickFence_DZ', 'LightPole_DZ', 'DeerStand_DZ', 'ForestLargeCamoNet_DZ', 'Plastic_Pole_EP1_DZ', 'Hedgehog_DZ', 'FuelPump_DZ', 'Fort_RazorWire', 'SandNest_DZ', 'ForestCamoNet_DZ', 'Fence_corrugated_DZ', 'CanvasHut_DZ', 'Generator_DZ')
AND FindVehicleKeysCount(Object_DATA.CharacterID) = 0;
RETURN ROW_COUNT();
ENDSQL Query to run:
SELECT DeleteNonKeyVehicles();
-
Ha, my bad :D
-
This is the classname to sell at trader:
m240_nest_kit
-
sure thing, just add the code to your player_build_publish.sqf
Something like
if (Plotpole) then { Add the player to the inventory of this plot };
Do not understand :D
-
I've got 2.5 version working with Snapping/Precise Build/Vector Build/Door Management but I have to add myself to the plot pole first to build, even if I place it.
Is there a way we can have it "automatically" add the person who places the plot pole so they can build right away?
[Fixed] Virtual Garage - spawnpoints for different Vehicle
in Scripting
Posted
Tried this and it doesn't even spawn the vehicle.