Jump to content

Bike,Quad,Mosqito Crafting Script


Amdathlon

Recommended Posts

So, it's been two weeks without another reply to this thread. I am particularly interested in allowing players to make the Mosquito helicopter, perhaps with a set of vehicle repair parts and 4 large salvage metal. I want this because the mosquito is the only helicopter on my server and only 3 are set to spawn, so if I could make it so players could craft their own, that would be awesome.

Link to comment
Share on other sites

The classname ebike_epoch just needs to be added to the Safe_vehicles array in the vehiclesimulation.fsm and it can be triggered by players the same way the UAV and Parachutes are, without being picked up by the de simulate cleanup. All found in the server_monitor.fsm.

Now the trick is adding it to the said array. Without adding it to the server code directly, and breaking dll CRC checksum. ;) It's possible.

 

so you use custom compiles to add the bike in.

 

Where is safe vehicle array? All i see is Epoch_save_vehicles

private["_aa"];

{_aa=_x getVariable["VEHICLE_SLOT","ABORT"];
if(_aa !="ABORT")then{if !(_x in EPOCH_saveVehQueue)then{EPOCH_saveVehQueue pushBack _x};};
_storSlot=_x getVariable["STORAGE_SLOT","ABORT"];
if(_storSlot !="ABORT")then{if !(_x in EPOCH_saveStorQueue)then{EPOCH_saveStorQueue pushBack _x};};}forEach _this;

where is this array?

Link to comment
Share on other sites

pr0dukt, on 14 Jan 2015 - 5:33 PM, said:snapback.png

The classname ebike_epoch just needs to be added to the Safe_vehicles array in the vehiclesimulation.fsm and it can be triggered by players the same way the UAV and Parachutes are, without being picked up by the de simulate cleanup. All found in the server_monitor.fsm.

Now the trick is adding it to the said array. Without adding it to the server code directly, and breaking dll CRC checksum. ;) It's possible.

 

but have you actually answered yourself....

Link to comment
Share on other sites

haha I opened that up already, didn't know you could open it up with notepad as well. Found the line! Thanks.

server_monitor       = compile preprocessFileLineNumbers "custom\server_monitor.fsm";

thats how it works right^?

 

edit: guess not, didn't work. how do you get fsm's to work, I read that previous post on last page but it didn't make much sense.

Link to comment
Share on other sites

if u want a bike that dissapears, than just create a menu.sqf with:

 

private["_veh", "_idx"];

Sleep 15;

_idx = -1;

while {alive player} do {

if(_idx == -1) then {

_idx = (vehicle player) addaction [("" + ("Bike") +""),"custom\Bike.sqf","",5,false,true,"","];

_veh = vehicle player;

};

if (_veh != vehicle player) then

{

_veh removeAction _idx;

_idx = -1;

};

Sleep 2;

};

 

place your path

 

and the bike.sqf from post 1 in your script or custom folder

 

Init:

[] execVM "

custom\menu.sqf";

 

tada, u have the dissapear bike !

 

but this help nothing.... we need to create a addon that added the bike to the Safe_vehicles array in the vehiclesimulation.fsm.... and i have no idea how it works :(

 

but this is not all.... that bike need a not sell funktion, and so on.... example: i buy a salvage metal for 35 crypto and sell a bike for 1500 ?!?   = not good :D

 

 

 

i hope the devs bring back the old bicycle from arma2.... with a normal craft option ! a bicycle in the real craftlist :-)

I did as you said and I do not have the menu that appears.

Link to comment
Share on other sites

It is not possible with this script someone needs to delete this topic, vehicles can only spawn if called by the server which this does not, how do I know because I finally got it working and not with this script.

Link to comment
Share on other sites

It is not possible with this script someone needs to delete this topic, vehicles can only spawn if called by the server which this does not, how do I know because I finally got it working and not with this script.

 

then release it please.... all want something like this.

Link to comment
Share on other sites

Serverside :

if(isServer) then {
	"SPAZ" addPublicVariableEventHandler {_this select 1 call Spawn_Ebike};

	Spawn_Ebike = {	

		private["_spawnPos","_spawnDir","_veh","_goat"];

		_spawnPos = _this select 1;
		_spawnDir = _this select 2;
		_veh = createVehicle["Ebike_Epoch", _spawnPos, [], 0, "NO_COLLIDE"];
		_veh allowDamage false;
		_veh setPos _spawnPos;
		_veh setDir _spawnDir;
		_veh setVectorUp (surfaceNormal (getPos _veh));
		_veh call EPOCH_server_setVToken;
		_veh call EPOCH_server_vehicleInit;
		_veh setVelocity [0,0,.1];
		_veh allowDamage true;
		
	};
};

clientside :

if (EPOCH_playerCrypto > 50) then {
	titleText ["", "PLAIN DOWN"];
	player playActionNow "Medic";
	_spawnPos = player modelToWorld [0,2,0];
	_spawnDir = (getDir player) -90;
	SPAZ = [player, _spawnPos, _spawnDir];
	EPOCH_playerCrypto = EPOCH_playerCrypto - 50 ;
	sleep 3;
	publicVariableServer "SPAZ";
	sleep 1;
	['You bought a bike for 50 crypto. Gone at restart!',0,0.7,2,0] spawn bis_fnc_dynamictext;
	player removeAction spazbike;
} else{
	['You need 50 crypto.',0,0.7,2,0] spawn bis_fnc_dynamictext;
};

ive got it set so you need 50 crypro to use then 50 crypto gets removed from your player balance once crafted 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×
×
  • Create New...