OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: epsilonsun on 03 Oct 2008, 05:34:47
-
I try to edit a mp mission,but something wrong there.
script runs every player,
How to run script only in server?
thanks alot!
-
Try:
(isnull player)
as a condition, because servers do not have players.
luke
-
Wrong, servers have players, dedicated servers dont have players.
If you only want to be sure the script is run on the server (with or without player), just put a simple condition at the very first line of your script:
IF it is SQF then:
if (!isServer) exitWith {};
IF it is SQS then:
? !isServer: exit