Jump to content

[NAPF] Scroll menu - Pick your own spawn point.


Recommended Posts

I TAKE NO CREDIT FOR THE ORIGINAL SCRIPT WHICH CAN BE FOUND HERE

 

All I have done is change the spawn locations so that it can be used with the new NAPF map.

 

1. Place Scripts\Newspawn\ folder in the root of your mission file.

 

2. At the bottom of init.sqf add this:

 
p2_newspawn = compile preprocessFileLineNumbers "Scripts\Newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

3. In dayz_server\compile\server_playerSetup.sqf

 
Find this line: dayzPlayerLogin2 = [_worldspace,_state];
 
Replace with: dayzPlayerLogin2 = [_worldspace,_state,_randomSpot];
 
Disable Anti-TP:
 
1. Open init.sqf and remove this line:
 
[] execVM "\z\addons\dayz_code\system\antihack.sqf";
 
If you are using antihax:
 
1. Find:
 
_cMenu = ['','RscMainMenu','RscMoveHigh','#WATCH', ...];
 
2. Add the command menu names you are using. Here are the default names used:
 
'#USER:newspawn','#USER:classes','#USER:Page4','#USER:Donator','#USER:Peasant'
 
Also make sure block all command menus is false:​
 
BLOCK ALL CMDMenus */ _BCM = false;

Download

Link to comment
Share on other sites

  • 4 weeks later...

Thx Renagade

 

If you dont want to get the spawn menu to be gone if your in combat add this[  execVM "Scripts\newspawn\newspawn_main.sqf"; ] 

Like below in every spawnlocation  ;)

titleText ["You can't select a spawn point while in combat.", "PLAIN DOWN", 3];
sleep 5;
titleFadeOut 1;
execVM "Scripts\newspawn\newspawn_main.sqf"; //<<--- every spawn location 

greetz

Link to comment
Share on other sites

i use a "spawn intro cute scene"-script

 

it use this code

 

// LOGIN CAMERA ON RE-LOG
camera = compile preprocessFileLineNumbers "camera\logincamera.sqf";
 
if !(dayzPlayerLogin2 select 2) then
{
    player spawn camera;

};

 

can i compine this with ur code?

 

p2_newspawn = compile preprocessFileLineNumbers "Scripts\Newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};

 

error from rpt log

 

 5:24:14   Error position: <dayzPlayerLogin2 select 2) then{player>

 5:24:14   Error Undefined variable in expression: dayzplayerlogin2
 
 
greetz and thx
Link to comment
Share on other sites

 

i use a "spawn intro cute scene"-script

 

it use this code

 

// LOGIN CAMERA ON RE-LOG
camera = compile preprocessFileLineNumbers "camera\logincamera.sqf";
 
if !(dayzPlayerLogin2 select 2) then
{
    player spawn camera;

};

 

can i compine this with ur code?

 

p2_newspawn = compile preprocessFileLineNumbers "Scripts\Newspawn\newspawn_execute.sqf";

waitUntil {!isNil ("PVDZE_plr_LoginRecord")};

if (dayzPlayerLogin2 select 2) then

{

    player spawn p2_newspawn;

};

 

error from rpt log

 

 5:24:14   Error position: <dayzPlayerLogin2 select 2) then{player>

 5:24:14   Error Undefined variable in expression: dayzplayerlogin2
 
 
greetz and thx

 

try this after waitUntil {camCommitted _camera}; place the part like below



waitUntil {camCommitted _camera};


sleep 2;
_camera cameraEffect ["terminate","back"];

p2_newspawn = compile preprocessFileLineNumbers ""Scripts\Newspawn\newspawn_execute.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn p2_newspawn;
};
Link to comment
Share on other sites

  • 1 month later...

So I am having an issue with the script. I have an antihack, i put in all the correct info that was giving and one of my players was banned for using the option to spawn in new location. you mention antihax, does that mean all anti hacks or just one specific one??

Link to comment
Share on other sites

Hi

I have a question, If i wish to have certain players spawn back at their base can I use the donator section by adding there uid in as example below:

 

if ((getPlayerUID player) in ["123456789","0","0"]) then {

 

If yes then Do I just copy one of the locations and alter the co-ords and name and save as (eg) player 123456789 Base.sqf and add this to the newspawn_main.sqf - here

 

Donator =


[
["",false],

  ["Donor Base", [2], "", -5, [["expression", format[EXECscript1,"donor.sqf]]], "1", "1"], 

 

 to where the base is and they will have a choice to spawn there. Changing the red to players name the new player123456789 base.sqf 

 

Thanks 

MegaZ

Link to comment
Share on other sites

Hello people, I installed this on my server and every thing works as far as i can see, But i have a problem that when this script is installed and I get in combat mode the combat icon stays flashing and you cant leave the server or build anything as it says your are still in combat any idea why?

init.sqf
http://pastebin.com/dqFE2ZAH

Newspawm_Main.sqf
http://pastebin.com/XqkgkVi5

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
  • Discord

×
×
  • Create New...