Jump to content

Help with marker script


fulannox_

Recommended Posts

 
 
 
Hello, I have a script ready, but I would like it to be visible only to those who have the tag., what do I do? (Marker is appearing for all untagged players)
 
 
 
local markerSize = 1.3 local markerR, markerG, markerB = exports.fv_engine:getServerColor("blue",false) addEventHandler("onClientResourceStart",getRootElement(),function(res) if res == getThisResource() then for k, v in pairs(dutyPackages) do local x, y, z, i, d = unpack(v.position) local marker = createMarker(x, y, z - 2, "cylinder", markerSize, markerR, markerG, markerB, 130) setElementInterior(marker, i); setElementDimension(marker, d); setElementData(marker, "duty.marker", true); setElementData(marker, "duty.faction", k); setElementData(marker, "m.custom", "duty"); end end if getResourceName(res) == "fv_engine" or getThisResource() == res then font = exports.fv_engine:getFont("rage",10); sColor2 = exports.fv_engine:getServerColor("servercolor",true); end end) local showTip = false local tipState = false local tick = false local dutyTick = 0 local w,h = 0,30; local x,y = screenX/2-w/2,screenY-150;
Link to comment

Hi, could you use code blocks because it is unreadable.

Quote

but I would like it to be visible only to those who have the tag

Like a tag in the nickname ? [TAG]Nickname ? You can check if the name of the player contains the tag by using string.find and then create markers.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...