Gallagher Posted February 20, 2014 Share Posted February 20, 2014 I have this event the client side, but does not work as I want. I want this event "(triggerServerEvent, 15000, 1," ClientHaveLevels "getLocalPlayer ())" is activated when the player dies. WHAT I put in place onPlayer spawn? function triplo() setTimer ( triggerServerEvent, 15000, 1, "ClientHaveLevels", getLocalPlayer() ) end addCommandHandler ("triplo", triplo) addEventHandler ( "onPlayerSpawn", getLocalPlayer(), triplo ) this script above works, but if the player relogin the event will be triggered again and I do not want it! Link to comment
Karuzo Posted February 20, 2014 Share Posted February 20, 2014 [url=https://wiki.multitheftauto.com/wiki/OnClientPlayerWasted]https://wiki.multitheftauto.com/wiki/On ... ayerWasted[/url] I think that's what you're lookin for. Link to comment
Gallagher Posted February 20, 2014 Author Share Posted February 20, 2014 [url=https://wiki.multitheftauto.com/wiki/OnClientPlayerWasted]https://wiki.multitheftauto.com/wiki/On ... ayerWasted[/url] I think that's what you're lookin for. Thanks friend, I had tried but not worked because onPlayerWasted is server side event. Link to comment
Wei Posted February 20, 2014 Share Posted February 20, 2014 function triplo() setTimer ( triggerServerEvent, 15000, 1, "ClientHaveLevels", getLocalPlayer() ) end addCommandHandler("triplo", triplo) addEventHandler("onClientPlayerWasted", getLocalPlayer(), triplo) Link to comment
Moderators Citizen Posted February 20, 2014 Moderators Share Posted February 20, 2014 this script above works Lol why are you lying ? onPlayerSpawn is a server side event only ... (or maybe you created one on clientside that is triggered from the server using onPlayerSpawn or client side using onClientPlayerSpawn but I doubt and it would be stupid) Link to comment
Bonsai Posted February 21, 2014 Share Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout. Link to comment
Moderators Citizen Posted February 21, 2014 Moderators Share Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout. By leaving the server, it forces him to logout ... Link to comment
Saml1er Posted February 21, 2014 Share Posted February 21, 2014 (edited) function triplo() removeEventHandler ( "onClientPlayerWasted", getLocalPlayer(), triplo ) setTimer ( function () triggerServerEvent, "ClientHaveLevels", getLocalPlayer() ) addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), triplo ) end, 15000,1, true ) end addCommandHandler ("triplo", triplo) addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), triplo ) Edited February 21, 2014 by Guest Link to comment
Bonsai Posted February 21, 2014 Share Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout. By leaving the server, it forces him to logout ... Ohh and I thought People stay logged in forever when after they once logged in Hey was talking about relogin, thought its about logout and in again. Link to comment
Saml1er Posted February 21, 2014 Share Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout. By leaving the server, it forces him to logout ... Ohh and I thought People stay logged in forever when after they once logged in Lmao. 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