Sign in to follow this  
Followers 0
John

Help - Identify all players

2 posts in this topic

Posted (edited)

Hi Guys,

Ive learnt alot from you and making scripts and cool features has now become a hobby. I am wondering if you could assist me with something I am for some reason having alot of trouble figuring out.

My current skill set allows me to do things locally to players, and globally on the server.. but I can't seem to figure out how to apply effects or code to all players on the server..

For instance, lets say I wanted to disable fatigue for all players on the server for a period of time.. I have no idea how to do this. 

{

_x allowSprint false;

} forEach AllPlayers;

That probably doesnt work, but you get the idea, I hope!

Essentially, do really dumb it down - (this is just an example!!!)

I want to do this

player setDamage 0;

But on ALL players in the server..

Whats the most efficient way to do this.. sorry if this is a stupid question but Im just struggling... 

Edited by John

Share this post


Link to post
Share on other sites

make an eventhandler for each client with the code you want to run. then public variable it from the server.

 

On the client run this code:

"Enigmamsg" addPublicVariableEventHandler {
       _packet = _this select 1;
      _msg = _packet select 0;
      systemChat Format ["%1",_msg ];
};

 

On the server you execute this code:

_msg = "Hello All players!";

  Enigmamsg= [_msg];
publicVariable "Enigmamsg";

 

 

and say you want to send the msg just to ONE particular player... well you will have to do a few extra steps as the server needs the ownerID of the player you want to send the message to.

have a look at this --- https://github.com/happydayz-enigma/Enigma_Exile_Custom

that gives a good layout of how to setup serverside files so you can send info to and from the server to players. :) need help pm me bro

Share this post


Link to post
Share on other sites
Advertisement

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.