amm2100 Posted July 9, 2015 Share Posted July 9, 2015 (edited) How to attach Blip to all Players on MyServer ?? Which Functions should I use ? Edited July 16, 2015 by Guest Link to comment
lolman Posted July 9, 2015 Share Posted July 9, 2015 createBlipAttachedTo but you have to loop players and then use the function. Link to comment
amm2100 Posted July 9, 2015 Author Share Posted July 9, 2015 Which Function can I use to get the Number of online Players ?? Link to comment
Markeloff Posted July 9, 2015 Share Posted July 9, 2015 Which Function can I use to get the Number of online Players ?? getPlayerCount Or just #getElementsByType("player") Link to comment
amm2100 Posted July 9, 2015 Author Share Posted July 9, 2015 local x = 0 local players = getElementsByType ( "player" ) for x,thePlayer in ipairs(players) do createBlipAttachedTo( thePlayer, 0, 2, 255, 0, 0, 255, 0, 99999.0, getRootElement() ) end Link to comment
amm2100 Posted July 9, 2015 Author Share Posted July 9, 2015 when another player join should I restart the function again ???? and How can I put the Bilp color = player name color ?? Link to comment
lolman Posted July 9, 2015 Share Posted July 9, 2015 No, just set a timer on it so it will be updated every idk how much seconds you want... and for the color : getPlayerNametagColor getBlipColor Link to comment
amm2100 Posted July 9, 2015 Author Share Posted July 9, 2015 Please Help I got error setTimer(for x,thePlayer in ipairs(players) do local r , b , g = getPlayerNametagColor ( thePlayer ) createBlipAttachedTo( thePlayer, 0, 2, r, b, g, 255, 0, 99999.0, getRootElement() ) end, 1000, infinite , x , thePlayer , players , r, b, g) Error in Console [21:36:07] SCRIPT ERROR: myserver\script.lua:33: unexpected symbol near 'for' [21:36:07] ERROR: Loading script failed: myserver\script.lua:33: unexpected symbol near 'for' Line 33 form setTimer Link to comment
lolman Posted July 9, 2015 Share Posted July 9, 2015 try setting a function name and then do setTimer(function name, 1000, 1) 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