Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
cash

onPlayerRespawn.sqf

Recommended Posts

Hello all . Can somebody explain please , why onPlayerRespawn.sqf file is not working on Dedicated server . And when I am starting my mission with this file inside , its work only for me ,but not for other players.

P.S. The file onPlayerKilled.sqf is working fine in both cases.

Thank you for help Holo , i'v find what the problem is . In my onPlayerRespawn.sqf file placed a command player moveInCargo _veh , and if I run it on Dedicated server , this command is not fired for any players . If I am a host this command working for me only . In Wiki says that this command has a local effect , but I can't even imagine how do this command run for all players .If anyone can help me with it , I would be thankful.

Edited by CASH

Share this post


Link to post
Share on other sites

is there a if isServer inside this script?

IsServer will return true for a player that host. it will return false for every player on a dedicated server

also maybe this script is launched only on server, which would make sense that is does things on your player only when you host and nothing on dedicated.

maybe that could help?

edit: as of this page https://community.bistudio.com/wiki/Arma_3_Respawn

said it will execute on players computer, so disregard my second tought

Edited by holo89

Share this post


Link to post
Share on other sites

thank you for help , i'll find a problem . In my onPlayerRespawn.sqf file placed a little command player moveInCargo _veh, and this command is not fire for other players if I am hosting server , if it dedicated server then this command don't fire at all for any players including me. And I am don't even imagine how do it command working.In Wiki says that this command have only local effect but how create a vehicle , that will be have locality for any players.

Share this post


Link to post
Share on other sites

old post but it could be useful to answer it.

onPlayerRespawn means "player" interface. There is no player on dedicated.

onPlayerRespawn is an event script working at start in MP, for player(s) or JIP, if respawnOnStart is not set to avoid that.

 

The moveInCargo problem comes from another behavior (see remarks for this command).

  • Haha 1

Share this post


Link to post
Share on other sites
Sign in to follow this  

×