SendNetworkString: Difference between revisions
Added an example
DrinkyBird (talk | contribs) No edit summary Tag: Source edit |
(Added an example) Tag: Source edit |
||
Line 19: | Line 19: | ||
== Examples == | == Examples == | ||
{{ | <syntaxhighlight lang="c"> | ||
Script "ReceiveStringOnServer" (int str) NET | |||
{ | |||
Print(s:"Received '", s:str, s:"' from a client"); | |||
} | |||
Script "ClientScript" (void) CLIENTSIDE | |||
{ | |||
// Since the third argument (client) was not specified, the print will appear for all players | |||
NamedSendNetworkString("ReceiveStringOnServer", "Hello Server"); | |||
} | |||
</syntaxhighlight> | |||
[[category:ACS functions]] | [[category:ACS functions]] |