Difference between revisions of "onPlayerConnected"

From Bohemia Interactive Community
Jump to navigation Jump to search
(revised, tidied, new vars on dev)
(example)
Line 26: Line 26:
  
 
____________________________________________________________________________________________
 
____________________________________________________________________________________________
|x1= <code>[[onPlayerConnected]] "[_id, _name] execVM ""PlayerConnected.sqf""";</code> |= Example 1  
+
|x1= <code>[[onPlayerConnected]] "[_id, _name] [[execVM]] ""PlayerConnected.sqf""";</code> |= Example 1  
 
|x2= <code>[[onPlayerConnected]] {[[diag_log]] [_id, _uid, _name]};</code> |= Example 2  
 
|x2= <code>[[onPlayerConnected]] {[[diag_log]] [_id, _uid, _name]};</code> |= Example 2  
 +
|x3= From Arma 3 v1.49: <code>[[onPlayerConnected]] {
 +
somevar = [[random]] 123;
 +
_owner [[publicVariableClient]] "somevar";
 +
//this will set somevar on
 +
//joining player PC to a random value
 +
};</code>|= Example 2
  
 
|mp= The ''statement'' is executed only on the server, not on the joining player's computer, nor on any other client.<br>
 
|mp= The ''statement'' is executed only on the server, not on the joining player's computer, nor on any other client.<br>

Revision as of 20:26, 7 July 2015

Template:Command

Notes

Bottom Section