knightscript Posted January 20, 2016 Share Posted January 20, 2016 Hello, im using Al3grab (https://community.multitheftauto.com/in ... ls&id=6911) It doesn´t have a clan blip system, and I want to add id, so i have this code: function gps() local group = getElementData(source,"Group") if group == "N/A" then return end local name = getPlayerName(source) thePlayer = getPlayerFromName ( name ) for k,v in ipairs ( getElementsByType("player") ) do local g = getElementData(v,"Group") if g == group then local myBlip = createBlipAttachedTo (thePlayer, 52) player_blips[source] = blip --setElementVisibleTo (myBlip, v, true ) end end end addEventHandler ("onPlayerLogin", getRootElement(),gps) And I want the blip to: 1.) Only be visible to clan members 2.) Disappear when player quits I have tried many ways, but each time i get different erros, so I give up haha , Thanks. Link to comment
ViRuZGamiing Posted January 20, 2016 Share Posted January 20, 2016 Is this server sided because you can use the 'visibleTo' for createBlipAttachedTo instead of setElementVisibleTo Link to comment
knightscript Posted January 20, 2016 Author Share Posted January 20, 2016 It can be as needed, currently is server-sided. Thanks Link to comment
lunix Posted January 20, 2016 Share Posted January 20, 2016 function createGroupBlips() for k, v in ipairs(getElementsByType("player")) do if getElementData(v, "Group") == getElementData(localPlayer,"Group") then GroupBlip = createBlipAttachedTo(v, 41) setElementData(GroupBlip, "GroupBlips","True") end end end This in server side make function and dont forget identfier sides of this Function 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