Turbe$Z Posted April 16, 2017 Posted April 16, 2017 my client: function coronaa() triggerServerEvent ("szoveg", root, getLocalPlayer()) end addEventHandler ( "onClientMarkerHit", ajtomegilyenek, coronaa ) and the server: addEvent( "szoveg", true ) addEventHandler( "szoveg", root, function(thePlayer) outputChatBox("Text", thePlayer, r,g,b, true) end) how to fix this?
Mr.Loki Posted April 16, 2017 Posted April 16, 2017 (edited) function coronaa(hitElement) if hitElement == localPlayer then triggerServerEvent ("szoveg", localPlayer) -- set the source of the event as the localPlayer. end end addEventHandler ( "onClientMarkerHit", ajtomegilyenek, coronaa ) addEvent( "szoveg", true ) addEventHandler( "szoveg", root, function() outputChatBox("Sup bruh?", source, r,g,b, true) -- usese the source of the event. end) -- Or jsut keep it client side unless u got other functions... function coronaa() outputChatBox("Sup bruh?", r,g,b, true) end addEventHandler ( "onClientMarkerHit", ajtomegilyenek, coronaa ) \/\/ Edited April 16, 2017 by Mr.Loki
koragg Posted April 16, 2017 Posted April 16, 2017 Why don't you just use the outputChatBox client side? It's totally pointless to use triggers for this
Moderators Citizen Posted April 16, 2017 Moderators Posted April 16, 2017 (edited) I'm pretty sure he wants the text to show for everyone instead: function coronaa() triggerServerEvent ("szoveg", localPlayer) end addEventHandler ( "onClientMarkerHit", ajtomegilyenek, coronaa ) addEvent( "szoveg", true ) addEventHandler( "szoveg", root, function() outputChatBox("Text", root, r,g,b, true) end) Edited April 16, 2017 by Citizen 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now