Jump to content
Repentz

[Tutorial] New Life Rule Timer [4.x]

Recommended Posts

1 minute ago, Pril- said:

I have explained in my post.

You can also create a trigger the same size as the nlr marker, and add a condition if the player enters, or a vehicle enters with that player in it! Then hint's to the player, and tells him.

//Credits to Ciaran for original creation of the script
private["_marker","_markerZone","_position"];
_position = getPos player;
[] spawn life_fnc_newLifeRule;
_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [350,350];
if(life_nlrtimer_running) then
{
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};

This is my code atm, and it wont show up. 

Share this post


Link to post
Share on other sites
2 minutes ago, Kruger said:
//Credits to Ciaran for original creation of the script
private["_marker","_markerZone","_position"];
_position = getPos player;
[] spawn life_fnc_newLifeRule;
_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [350,350];
if(life_nlrtimer_running) then
{
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};

This is my code atm, and it wont show up. 


private["_marker","_markerZone","_position"];
_position = getPos player;

if(life_nlrtimer_running) then {
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};

[] spawn life_fnc_newLifeRule;

_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [350,350];

Change it to that.

 

Give me a few minutes, Ill do the trigger for you!

Edited by Pril-

Share this post


Link to post
Share on other sites
6 minutes ago, Pril- said:

private["_marker","_markerZone","_position"];
_position = getPos player;

if(life_nlrtimer_running) then {
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};

[] spawn life_fnc_newLifeRule;

_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [350,350];

Change it to that.

 

Give me a few minutes, Ill do the trigger for you!

Thanks bud! Really appreacite it. 

Share this post


Link to post
Share on other sites
14 hours ago, Pril- said:

Just change all the setMarker to setMarkerLocal

Should i not change all the createMarker to createMarkerLocal?

Or should i change everything to local?

Share this post


Link to post
Share on other sites
11 hours ago, AngryHerring ッ ®™ said:

How do we make it persistent. IE: player disconnects and reconnects but will still have the NLR?

Write your own script to do it and store it in the DB.

Share this post


Link to post
Share on other sites
6 hours ago, Deoxyr said:

I copied everything and went over it twice but when i load in i get the following error:

81233da94af6848f0606bfb5900904db.png
 

Pastebin/SQFBin your client RPT from when you get the error.

Share this post


Link to post
Share on other sites

@Drunken Cheetah

I added the marker as following but after or on death there wont be a marker on the map.
Could you help me?

if(life_nlrtimer_running) then
{
private["_marker","_markerZone","_position"];
_position = getPos player;
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};
[] spawn life_fnc_newLifeRule;
_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [500,500];

Share this post


Link to post
Share on other sites
16 minutes ago, Deoxyr said:

@Drunken Cheetah

I added the marker as following but after or on death there wont be a marker on the map.
Could you help me?

if(life_nlrtimer_running) then
{
private["_marker","_markerZone","_position"];
_position = getPos player;
life_nlrtimer_stop = true;
waitUntil {!life_nlrtimer_running};
};
[] spawn life_fnc_newLifeRule;
_marker = createMarker ["newlife",_position];
_marker setMarkerColor "ColorBlack";
_marker setMarkerType "mil_warning";
_marker setMarkerText "!!! NLR - DO NOT ENTER !!!";
_marker setMarkerAlpha 0.95;
_markerZone = createMarker ["newliferule",_position];
_markerZone setMarkerColor "ColorRed";
_markerZone setMarkerType "Empty";
_markerZone setMarkerShape "ELLIPSE";
_markerZone setMarkerSize [500,500];

NVM got it to work

Share this post


Link to post
Share on other sites

I got it setup including the marker and it is fully working.

But got a problem / bug.

When you die within the next 10 minutes the timer doesnt start from the beginnen and the marker wont update all the time.

You guys know a way to fix it?

Share this post


Link to post
Share on other sites
On 6/12/2019 at 8:15 AM, Deoxyr said:

I got it setup including the marker and it is fully working.

But got a problem / bug.

When you die within the next 10 minutes the timer doesnt start from the beginnen and the marker wont update all the time.

You guys know a way to fix it?

Rewrite the script. If you die like that as it is, it actually throws an error to your RPT.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...