Ashur Posted December 27, 2020 Share Posted December 27, 2020 (edited) Hello! Please help me figure out why the argument is not passed from the server side to the client, nothing is displayed in the chat. And the event itself is also not triggered, because the function is also not executed even if you perform actions without an argument. Previously, I had no problem with this, but something went wrong. I'm a newbie, sorry for the language, I use a translator Client side: addEvent("boatSail", true) addEventHandler ( "boatSail", root, function(text) outputChatBox(text) end) Server side: function cruisingBoat() local x, y, z = -2611.08203125, 1476.525390625, -0.55000001192093 local boat = createVehicle(453, x, y, z) local driver = createPed (120, x, y, z) warpPedIntoVehicle (driver, boat) local text = "123456" triggerClientEvent("boatSail", getRootElement(), text) end addEventHandler ( "onResourceStart", getRootElement(), cruisingBoat ) Edited December 27, 2020 by Ashur Link to comment
Tekken Posted December 27, 2020 Share Posted December 27, 2020 You getting any error in /debugscript 3 something like attempt to call non existing client side event this might be 'cause you call it before the client side event it's even created try with "onPlayerJoin" 1 Link to comment
Ashur Posted December 27, 2020 Author Share Posted December 27, 2020 25 minutes ago, Tekken said: You getting any error in /debugscript 3 something like attempt to call non existing client side event this might be 'cause you call it before the client side event it's even created try with "onPlayerJoin" Thank you very much, everything seems to work 1 Link to comment
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