threevictor Posted January 27, 2017 Share Posted January 27, 2017 Hello guys, I would like to know if there is any command to solve my problem, I put a ped in an interior but it is practically invisible impossible to be seen. Do you have something to solve this? Link to comment
Rose Posted January 27, 2017 Share Posted January 27, 2017 setElementInterior(element, int) ? Link to comment
threevictor Posted January 28, 2017 Author Share Posted January 28, 2017 1 hour ago, Hit+ said: setElementInterior(element, int) ? I already did that but he's still invisible. Link to comment
threevictor Posted January 28, 2017 Author Share Posted January 28, 2017 (edited) 38 minutes ago, idarrr said: Post your code. Here is local Mk1 = createMarker(2412.501953125, 1123.806640625, 10.8203125 +1,"arrow",1.8,255,255,0,255) local Mk2 = createMarker(390.76953125, 173.7890625, 1008.3828125 +1,"arrow",1.8,255,255,0,255) local Mk3 = createMarker(368.4228515625, 194.0439453125, 1008.3828125 +1,"arrow",1.4,255,50,0,255) local Mk4 = createMarker(2149.4716796875, 1603.0419921875, 1006.1677246094 +1,"arrow",1.4,255,50,0,255) local Mk5 = createMarker(2144.21484375, 1625.703125, 993.68817138672 -1,"cylinder",2,255,50,0,255) setElementDimension(Mk2,0) setElementInterior(Mk2,3) setElementDimension(Mk3,0) setElementInterior(Mk3,3) setElementDimension(Mk4,0) setElementInterior(Mk4,1) setElementDimension(Mk5,0) setElementInterior(Mk5,1) function warp (player) setElementPosition(player,388.8701171875, 173.806640625, 1008.3828125) setElementDimension(player,0) setElementInterior(player,3) end addEventHandler("onMarkerHit",Mk1,warp) function warp2 (player) setElementPosition(player,2414.3779296875, 1123.6572265625, 10.8203125) setElementDimension(player,0) setElementInterior(player,0) end addEventHandler("onMarkerHit",Mk2,warp2) function warp3 (player) setElementPosition(player,2147.8505859375, 1601.66796875, 1006.1677246094) setElementDimension(player,0) setElementInterior(player,1) end addEventHandler("onMarkerHit",Mk3,warp3) function atvbomba (player) outputChatBox("#FFFFFFPara arrombar o cofre digite /arrombar",player,0,0,0,true) end addEventHandler("onMarkerHit",Mk5,atvbomba) function pedLoad ( ped1 ) createPed ( 105, 2144.974609375, 1633.62890625, 993.57611083984 ) setElementInterior(ped1, 1) end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) Edited January 28, 2017 by #banana Link to comment
idarrr Posted January 28, 2017 Share Posted January 28, 2017 (edited) function pedLoad () local ped1 = createPed ( 105, 2144.974609375, 1633.62890625, 993.57611083984 ) setElementInterior(ped1, 1) end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) Replace the pedLoad function with this. Edited January 28, 2017 by idarrr Link to comment
threevictor Posted January 28, 2017 Author Share Posted January 28, 2017 4 minutes ago, idarrr said: function pedLoad () local ped1 = createPed ( 105, 2144.974609375, 1633.62890625, 993.57611083984 ) setElementInterior(ped1, 1) end addEventHandler ( "onResourceStart", getResourceRootElement(), pedLoad ) Replace the pedLoad function with this. Thank you worked Already taking advantage of the cituation I think it's too annoying to add marker pro marker is there any specific function that can create several at once only with the coordinates? Link to comment
idarrr Posted January 28, 2017 Share Posted January 28, 2017 (edited) Sure, this may work, im not testing it yet. -- Use this format -- {marker X, Y, Z, Type, Size, R, G, B, A, Dimension, Interior, Warp point X, Y, Z, Dimension, Interior }, data = { {2412.501953125 , 1123.806640625 , 10.8203125 +1 ,"arrow" ,1.8, 255, 255, 0, 255, 0, 0, 388.8701171875 , 173.806640625 , 1008.3828125 , 0, 3}, {390.76953125 , 173.7890625 , 1008.3828125 +1 ,"arrow" ,1.8, 255, 255, 0, 255, 0, 3, 2414.3779296875, 1123.6572265625, 10.8203125 , 0, 0}, {368.4228515625 , 194.0439453125 , 1008.3828125 +1 ,"arrow" ,1.4, 255, 50 , 0, 255, 0, 3, 2147.8505859375, 1601.66796875 , 1006.1677246094, 0, 1}, } markers = {} -- Table to store the element markers here for i, v in pairs(data) do local marker = createMarker(v[1], v[2], v[3], v[4], v[5], v[6], v[7], v[8], v[9]) setElementDimension(marker, v[10]) setElementInterior(marker, v[11]) markers[marker] = {v[12], v[13], v[14], v[15], v[16]} -- Store the warp point addEventHandler("onMarkerHit", marker, warp) -- Attach an event to every marker end function warp (player) if markers[source] and isElement(player) and getElementType(player) == "player" then -- Make sure the element is a player and hit the right marker setElementPosition(player, markers[source][1], markers[source][2], markers[source][3]) setElementDimension(player, markers[source][4]) setElementInterior(player, markers[source][5]) end end Edited January 28, 2017 by idarrr Typo 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