Jump to content
Sign in to follow this  
lucilk

how to refer player in MP scripts

Recommended Posts

can anyone tell me how can i refer any playable unit and JIP in scripts so the scripts can be executed for all of them not just the designated player in the editor.

Share this post


Link to post
Share on other sites

player

Just make sure you're running the script on all clients, and maybe toss in a !isServer if you don't want the server to do it too.

Share this post


Link to post
Share on other sites

ok....i did put player all over but why sometimes is not working on a dedi server?

any ideea?

Share this post


Link to post
Share on other sites

Instead of !isServer, use !isNull player. That way it will work on a hosted server the same as it does on a dedicated, assuming it's supposed to run once on each client/player.

Also JIP is never the server, so if you want the script to run on JIP players as well (who have player as null at the start), use !(isServer && isNull player) to make sure it runs once for all players including JIP.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×