Gallagher Posted February 20, 2014 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!
Karuzo Posted February 20, 2014 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.
Gallagher Posted February 20, 2014 Author 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.
Wei Posted February 20, 2014 Posted February 20, 2014 function triplo() setTimer ( triggerServerEvent, 15000, 1, "ClientHaveLevels", getLocalPlayer() ) end addCommandHandler("triplo", triplo) addEventHandler("onClientPlayerWasted", getLocalPlayer(), triplo)
Moderators Citizen Posted February 20, 2014 Moderators 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)
Bonsai Posted February 21, 2014 Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout.
Moderators Citizen Posted February 21, 2014 Moderators Posted February 21, 2014 Maybe you should just cancelEvent onPlayerLogout. By leaving the server, it forces him to logout ...
Saml1er Posted February 21, 2014 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
Bonsai Posted February 21, 2014 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.
Saml1er Posted February 21, 2014 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.
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