sel3a Posted November 3, 2014 Share Posted November 3, 2014 Guys i am trying to make the marker when you type something it shows up i've made with the objects when you type the command it shows up. but i can't make when type the command a marker shows up. This is the script: sel3a1 = {} addCommandHandler ( "put", function(plr) team = getPlayerTeam ( plr ) if getTeamName ( team ) ~= "Criminals" then return end x,y,z = getElementPosition ( plr ) r1,r2,r3 = getElementRotation ( plr ) Sel3a = createObject ( 3108, x, y, z, r1, r2, r3 ) table.insert ( sel3a1, Sel3a ) end) addCommandHandler ( "remove", function(plr) team = getPlayerTeam ( plr ) if getTeamName ( team ) ~= "Criminals" then return end for k,v in ipairs ( sel3a1 ) do destroyElement ( v ) end end) i tried to change the CreateObject to createMarker like Sel3a = createMarker ( cylinder, x, y, z, r1, r2, r3 ) but it didn't work please help. Thanks Link to comment
ALw7sH Posted November 3, 2014 Share Posted November 3, 2014 Sel3a = createMarker ( x, y, z, 'cylinder', 1,255,255,255,170) Link to comment
sel3a Posted November 3, 2014 Author Share Posted November 3, 2014 Thanks mate works fine but there is one problem it comes a bit high in the middle of the ped!!!! check this link http://i.imgur.com/LESQXGr.jpg huh, how to solve the problem ? and thanks again Link to comment
ALw7sH Posted November 3, 2014 Share Posted November 3, 2014 Thanks mate works fine but there is one problem it comes a bit high in the middle of the ped!!!! check this link http://i.imgur.com/LESQXGr.jpg huh, how to solve the problem ? and thanks again number one is the scale maybe 0.5 will be pefrect Sel3a = createMarker ( x, y, z, 'cylinder', 0.5,255,255,255,170) Link to comment
sel3a Posted November 3, 2014 Author Share Posted November 3, 2014 Thank you mate Works fine. Link to comment
sel3a Posted November 3, 2014 Author Share Posted November 3, 2014 mate i did the script with the marker the color of it keep changing i can't put it but when i remove it it works the marker will be gone but the ''debug script 2'' its keep spamming with. WARNING: [test]\marker\add.lua: 38 Bad argument @ 'setMarkerColor' [Expected element at argument 1] this is the script /: sel3a1 = {} addCommandHandler ( "put", function(plr) team = getPlayerTeam ( plr ) if getTeamName ( team ) ~= "Admin" then return end x,y,z = getElementPosition ( plr ) r1,r2,r3 = getElementRotation ( plr ) Sel3a = createObject ( 3108, x, y, z-1, r1, r2, r3 ) table.insert ( sel3a1, Sel3a ) end) sel3a5002 = {} local v = {sel3a1,sel3a5002} local u = {sel3a1,sel3a5002} addCommandHandler ( "remove", function(plr) team = getPlayerTeam ( plr ) if getTeamName ( team ) ~= "Admin" then return end for k,v in ipairs (sel3a5002) do destroyElement ( v ) end for k,u in ipairs (sel3a1) do destroyElement ( u ) end end) addCommandHandler("put",function(plr) team = getPlayerTeam ( plr ) if getTeamName ( team ) ~= "Admin" then return end x,y,z = getElementPosition ( plr ) r1,r2,r3 = getElementRotation ( plr ) local Sel3a = createMarker ( x, y, z-1, 'cylinder', 1,255,0,0) setTimer(function () if Sel3a then setMarkerColor(Sel3a, math.random(0,255), math.random(0,255), math.random(0,255), 90) table.insert ( sel3a5002, Sel3a) end end,100,0) end) 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