Tommy. Posted January 16, 2018 Share Posted January 16, 2018 (edited) RESOLVED Edited January 16, 2018 by Tommy. error scripting Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 2 minutes ago, Tommy. said: I NEED URGENT HELP !!! CLIENT-SIDE: function dev_Giroflex (_,state) if var_Giroflex == true then if state == "down" then if isCursorOnElement (x*502, y*421, x*152, y*38) then triggerServerEvent ( "desligar_Giroflex", getLocalPlayer()) end end end end addEventHandler ("onClientClick", root, dev_Giroflex) SERVER-SIDE: function removeGiroflex(thePlayer, cmd) local viatura = getPedOccupiedVehicle(thePlayer) killTimer(l_timer[viatura]) killTimer(l_timer2[viatura]) killTimer(l_timer3[viatura]) killTimer(l_timer4[viatura]) killTimer(l_timer5[viatura]) setVehicleLightState (viatura, 0, 0) setVehicleLightState (viatura, 1, 0) setVehicleLightState (viatura, 2, 0) setVehicleLightState (viatura, 3, 0) light1[viatura] = 0 end addEvent("desligar_Giroflex",true) addEventHandler("desligar_Giroflex", root, removeGiroflex) DEBUGSCRIPT: Men, you can´t use "thePlayer" in serverside when you send since clientside. Change "thePlayer" for source or put a variable. ( i recommend you change for source ). Link to comment
Tommy. Posted January 16, 2018 Author Share Posted January 16, 2018 2 minutes ago, <~KaMiKaZe~> said: Men, you can´t use "thePlayer" in serverside when you send since clientside. Change "thePlayer" for source or put a variable. ( i recommend you change for source ). the same error continued Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 10 minutes ago, Tommy. said: the same error continued you put a variable for everything? If you don´t show all the code, we can´t help you Link to comment
Tommy. Posted January 16, 2018 Author Share Posted January 16, 2018 Just now, <~KaMiKaZe~> said: you put a variable for everything? If you don´t show all the code, we can´t help you I had put the wrong code, This one I put is the current one. RESOLVED Link to comment
KaMi Posted January 16, 2018 Share Posted January 16, 2018 I recommend removing the "or" and doing it in different functions because sometimes the "if" does not detect it Link to comment
Tommy. Posted January 16, 2018 Author Share Posted January 16, 2018 6 minutes ago, <~KaMiKaZe~> said: I recommend removing the "or" and doing it in different functions because sometimes the "if" does not detect it OK I will do it. Thank you bro! Link to comment
quindo Posted January 16, 2018 Share Posted January 16, 2018 1 hour ago, <~KaMiKaZe~> said: I recommend removing the "or" and doing it in different functions because sometimes the "if" does not detect it In what situation would it not detect it? I can't think of a single case where it happens. 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