Overkillz Posted September 1, 2015 Share Posted September 1, 2015 Hey there, I have a little problem triggering to a Local user (Just the local user) well, my problem is, when the player press the L and If he hasn't any lang chosen, then make a trigger to chose the lang. It works perfectly with command, but IDK why is wrong. -- Trigger Server triggerClientEvent("onToggleLang",resourceRoot,true) -- Client Event addEvent ( "onToggleLang", true ) addEventHandler ( "onToggleLang", getRootElement(),toggleLang) If you need another part of the script, just ask me. Regards. Link to comment
KariiiM Posted September 2, 2015 Share Posted September 2, 2015 (edited) Why you did resourceRoot? it should be like that triggerClientEvent(source,"onToggleLang",source) Edited September 2, 2015 by Guest Link to comment
Mr.Loki Posted September 2, 2015 Share Posted September 2, 2015 triggerClientEvent(source,"onToggleLang",source[,arguments]) Should work edit: damn, you beat me to it Kariiim Link to comment
KariiiM Posted September 2, 2015 Share Posted September 2, 2015 @overKill resourceRoot is not defined itself, so each time you want to use this name you've to define it by yourself Link to comment
Overkillz Posted September 2, 2015 Author Share Posted September 2, 2015 Thanks guys, I wasn't notified that I have defined thePlayer in the name of function and now it works perfect now it is fixed ^^ start of my code fixed by u guys ^^: function langChat(thePlayer, cmd, ...) local mycountry = getElementData(thePlayer, "langShi") if not mycountry then triggerClientEvent(thePlayer,"onToggleLang",thePlayer) return end --... rest of code Thanks newly Regards. 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