triggerNetworkEvent: Difference between revisions

no edit summary
m (Added note stating that as of 1.7.11, you can only pass through types provided by GTA:C for vararg arguments.)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 14: Line 14:
|return1 = void
|return1 = void
|returnFail1 = void
|returnFail1 = void
|notes = When used in a server script, use null to send the event to all clients or specify a client object. See [[Shared/Functions/Network/addNetworkHandler|addNetworkHandler]] for information regarding custom event handler functions.
|notes = When used in a server script, use null to send the event to all clients or specify a client object. See [[Shared/Functions/Network/addNetworkHandler|addNetworkHandler]] for information regarding custom event handler functions.<br>Passing <code>vararg</code> arguments that are not default types of GTA:C, the function will fail.
Passing <code>vararg</code> arguments that are not default types of GTA:C, the function will fail.
|exampleJSSS = function makeCivilianWalkToPos(civilian, x, y, z) {
|exampleJSSS = function makeCivilianWalkToPos(civilian, x, y, z) {
     triggerNetworkEvent("walkToPos", null, civilian, x, y);
     triggerNetworkEvent("walkToPos", null, civilian, x, y);
}
}
}}
}}
14

edits