You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localmessageToSend="Hello, world!" -- this string would be passed to server
4
+
localmessageToSend="Hello, world!" -- this string would be passed to server
5
5
6
-
triggerServerEvent("onServerSendMessage", localPlayer, messageToSend) -- refer to the note on wiki page (under theElement), for understanding which element you should use as 2nd argument
6
+
triggerServerEvent("onServerSendMessage", localPlayer, messageToSend) -- refer to the note on wiki page (under theElement), for understanding which element you should use as 2nd argument
if (notclient) then-- 'client' points to the player who triggered the event, and should be used as security measure (in order to prevent player faking)
14
-
returnfalse-- if this variable doesn't exists at the moment (for unknown reason, or it was the server who triggered this event), stop code execution
15
-
end
13
+
if (notclient) then-- 'client' points to the player who triggered the event, and should be used as security measure (in order to prevent player faking)
14
+
returnfalse-- if this variable doesn't exists at the moment (for unknown reason, or it was the server who triggered this event), stop code execution
15
+
end
16
16
17
-
localmatchingSource= (source==client) -- check whether source element (2nd argument in triggerServerEvent) passed from client was the exact same player
17
+
localmatchingSource= (source==client) -- check whether source element (2nd argument in triggerServerEvent) passed from client was the exact same player
18
18
19
-
if (notmatchingSource) then-- apparently it wasn't
20
-
returnfalse-- so do not process this event
21
-
end
19
+
if (notmatchingSource) then-- apparently it wasn't
20
+
returnfalse-- so do not process this event
21
+
end
22
22
23
-
localdataType=type(sentMessage) -- check type of data coming from client
0 commit comments