xyz Posted April 10, 2016 Share Posted April 10, 2016 Is there any short way to add a blip on a player when he joins and remove it when he leaves, also change the blips color when he changes his team? Link to comment
Captain Cody Posted April 10, 2016 Share Posted April 10, 2016 onPlayerJoin OnPlayerQuit SetTimer (Update color) Killtimer(Wut ever is above) Tralla Link to comment
xyz Posted April 10, 2016 Author Share Posted April 10, 2016 Yeah I know that, but how does the join/quit thing work? Someone told me about isElement but I didnt get it Link to comment
Captain Cody Posted April 10, 2016 Share Posted April 10, 2016 The hell? onQuit destroy it killTimer onJoin Create it createTimer that checks color ever so often + Trigger on player respawn or what not Link to comment
Noki Posted April 11, 2016 Share Posted April 11, 2016 local blips = {} function addPlayerBlip() blips[source] = createBlip(...) end addEventHandler("onPlayerJoin", root, addPlayerBlip) function removePlayerBlip() if (blips[source]) then destroyElement(blips[source]) blips[source] = nil end addEventHandler("onPlayerQuit", root, removePlayerBlip) Of course it's a bit more complex, but this should serve as a good basic rubric to work off. 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