dayz_epoch吧 关注:8贴子:55
  • 0回复贴,共1

【ep服务器建设】:工具箱制作自行车插件,不需要时候可回收!

只看楼主收藏回复

config文件夹里 新建pack.sqf文件 写入:
if (false) then {
cutText [format["You are in combat and cannot re-pack your bike."], "PLAIN DOWN"];
} else {
player removeAction s_player_deploybike2;
player playActionNow "Medic";
r_interrupt = false;
player addWeapon "ItemToolbox";
deletevehicle cursortarget;
_dis=10;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
cutText [format["You have packed your bike and been given back your toolbox"], "PLAIN DOWN"];
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
};
====================config文件夹里 新建deploy.sqf文件 写入:
if (false) then {
cutText [format["You are in combat and cannot build a bike."], "PLAIN DOWN"];
} else {
player removeAction s_player_deploybike;
player playActionNow "Medic";
r_interrupt = false;
player removeWeapon "ItemToolbox";
_dis=10;
_sfx = "repair";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
_object = "Old_bike_TK_INS_EP1" createVehicle (position player);
_object setVariable ["ObjectID", "1", true];
_object setVariable ["ObjectUID", "1", true];
player reveal _object;
cutText [format["You*ve used your toolbox to build a bike! How magical!"], "PLAIN DOWN"];
r_interrupt = false;
player switchMove "";
player playActionNow "stop";
sleep 10;
cutText [format["Warning: Spawned bikes DO NOT SAVE after server restart!"], "PLAIN DOWN"];
};
//bike deploy script by Player2 - OpenDayz Release Coming Soon!
================然后init文件夹里fn_selfActions.sqf里 写入
_weapons = [currentWeapon player] + (weapons player) + (magazines player);
_isBike = typeOf cursorTarget in ["Old_bike_TK_INS_EP1","Old_bike_TK_CIV_EP1"];
//BIKE DEPLOY
if ("ItemToolbox" in _weapons) then {
hasBikeItem = true;
} else { hasBikeItem = false;};
if((speed player <= 1) && hasBikeItem && _canDo) then {
if (s_player_deploybike < 0) then {
s_player_deploybike = player addaction[("<t color=""#007ab7"">" + ("Deploy Bike") +"</t>"),"config\deploy.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike;
s_player_deploybike = -1;
};
//PACK BIKE
if((_isBike) and _canDo) then {
if (s_player_deploybike2 < 0) then {
s_player_deploybike2 = player addaction[("<t color=""#007ab7"">" + ("Re-Pack Bike") +"</t>"),"config\pack.sqf","",5,false,true,"", ""];
};
} else {
player removeAction s_player_deploybike2;
s_player_deploybike2 = -1;
};
===================================================
如果服务器有BE反作弊程序。它会判定你作弊。必须要修改以下文件!
在init文件夹里 variables.sqf文件里
DZE_safeVehicle = ["ParachuteWest","ParachuteC"];
改为
DZE_safeVehicle = ["ParachuteWest","ParachuteC","Old_bike_TK_INS_EP1"];


IP属地:江苏1楼2014-08-01 00:43回复