Anubhav Posted June 27, 2014 Posted June 27, 2014 Hi guyz, Today I made a blip system which added blips on players. In the mini-map it doesn't show the blip. BUt on the large map it shows. What is the problem? See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
xXMADEXx Posted June 27, 2014 Posted June 27, 2014 Your blip distance is probably to low. Check createBlip and look at the visible distance parameter. The Ultimate Lua Tutorial! | MTA PHP SDK
Anubhav Posted June 27, 2014 Author Posted June 27, 2014 I am using createBlipAttached to and i have set the visible value to 65535 and still its not showing. A very near player is not coming in it! is radar bugged? See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Et-win Posted June 27, 2014 Posted June 27, 2014 Try putting it on 99999.0 like default? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Anubhav Posted June 27, 2014 Author Posted June 27, 2014 not working! See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
SkatCh Posted June 27, 2014 Posted June 27, 2014 post your code here . Failure is simply an opportunity to begin again more intelligently - Henry Ford
Anubhav Posted June 27, 2014 Author Posted June 27, 2014 function destroyAllBlips(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end function createBlips() destroyAllBlips(root) local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local r,g,b,a = getTeamColor(getPlayerTeam(v)) createBlipAttachedTo(v,0,2,r,g,b,a,0,99999.0) end end setTimer(createBlips,500,0) function destroyer( thePlayer ) destroyAllBlips( thePlayer ) end addEventHandler("onPlayerQuit",root,destroyer) See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Anubhav Posted June 28, 2014 Author Posted June 28, 2014 Any help please? I realy need to do this fast. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
Stranger Posted June 28, 2014 Posted June 28, 2014 try this: blips = { } function createBlips() local players = getElementsByType ( "player" ) for k,v in ipairs(players) do if isElement (blips[v]) then destroyElement (blips[v]) blips[v] = nil end local r,g,b,a = getTeamColor(getPlayerTeam(v)) blips[v] = createBlipAttachedTo(v,0,2,r,g,b,a,0,99999.0, root) end end setTimer(createBlips,500,0) function destroyer() if isElement (blips[source]) then destroyElement (blips[source]) blips[source] = nil end end addEventHandler("onPlayerQuit",root,destroyer)
codeluaeveryday Posted June 28, 2014 Posted June 28, 2014 WTF, why are you spamming the createBlips function? That's one way to bring the servers performance down. function destroyAllBlips(player) local attached = getAttachedElements ( player ) if ( attached ) then for k,element in ipairs(attached) do if getElementType ( element ) == "blip" then destroyElement ( element ) end end end end function createBlips() destroyAllBlips(root) local players = getElementsByType ( "player" ) for k,v in ipairs(players) do local r,g,b,a = getTeamColor(getPlayerTeam(v)) createBlipAttachedTo(v,0,2,r,g,b,a,0,99999.0) end end setTimer(createBlips,500,0) function destroyer( thePlayer ) destroyAllBlips( thePlayer ) end addEventHandler("onPlayerQuit",root,destroyer) Tutorials: => getOnlineAdmins() => [TUT] Better Join Country => [TUT] Updating admin countries => [TUT] Updating admin flags Server: K@N Zombies / Freeroam
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