AnnaBelle Posted April 18, 2017 Posted April 18, 2017 addEventHandler("onResourceStart",getRootElement(),function(thePlayer) if(getElementData(thePlayer,"Group")== "Testing" )then blip = createBlip(100,20,0,31) setBlipVisibleDistance(blip,1000) end end) error getElementData
AnnaBelle Posted April 18, 2017 Author Posted April 18, 2017 blip\script.lua:2: Bad argument @ 'getElementData' [Expected element at argument 1, got resource-data]
#BrosS Posted April 18, 2017 Posted April 18, 2017 try it on client side , it worked for me addEventHandler("onClientResourceStart",resourceRoot, function() if(getElementData(localPlayer,"Group")== "Test" )then blip = createBlip(100,20,0,31) setBlipVisibleDistance(blip,1000) end end)
AnnaBelle Posted April 18, 2017 Author Posted April 18, 2017 When I leave the group the blip is still appearing
szekelymilan Posted April 18, 2017 Posted April 18, 2017 (edited) On the leave command, just destroy the blip. function leaveTestGroup () -- your code -- ... if (blip) then destroyElement (blip) blip = nil end end addCommandHandler ("leave", leaveTestGroup) Edited April 18, 2017 by MakroBox
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