gokalpfirat Posted June 25, 2011 Posted June 25, 2011 I see in the some RPG servers they are using their own blips. And there is no example or function to do this. How? And how can i make a dxText to the top of the marker(I see in a sw but dx creates a text in screen i think?)
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 Edit: I find custom blips but dxtext top of Marker?
[DemoN] Posted June 25, 2011 Posted June 25, 2011 https://community.multitheftauto.com/ind ... ls&id=1960 You can use that script...
SDK Posted June 25, 2011 Posted June 25, 2011 I want cake DemoN linked to the wrong resource: https://community.multitheftauto.com/index.php?p= ... ils&id=960
[DemoN] Posted June 25, 2011 Posted June 25, 2011 I want cakeDemoN linked to the wrong resource: https://community.multitheftauto.com/index.php?p= ... ils&id=960 No he wanted to add blips on his map and draw a text on his marker and i gave the link of drawing a text.... Btw You can use this function... DxDrawText
SDK Posted June 25, 2011 Posted June 25, 2011 Ah, I thought you linked to the wrong one since there id's are almost the same
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 I dont want to give a script what i want i want only example and function do this.
JR10 Posted June 25, 2011 Posted June 25, 2011 functions: dxDrawText getScreenFromWorldPosition example: local x, y, z = getElementPosition(theMarker) local sx, sy = getScreenFromWorldPosition(x, y, z+3) dxDrawText('MARKER', x, y, --rest of the arguments
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 Thans JR10 you always help me and others:)
DarkLink Posted June 25, 2011 Posted June 25, 2011 Thans JR10 you always help me and others:) indeed, he's a good mate. keep it up ! mta community always need people like u
will briggs Posted June 25, 2011 Posted June 25, 2011 LOL JR10 - The super helper.... That should be your sig
JR10 Posted June 25, 2011 Posted June 25, 2011 LOL JR10 - The super helper....That should be your sig ROFL.
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 function cadirkur (thePlayer) local x,y,z = getElementPosition(thePlayer) local sx,sy = getScreenFromWorldPosition(x,y+3,z+3) local isim = getPlayerName(thePlayer) createObject(1678,x,y+3,z) dxDrawText (isim,sx,sy) end addCommandHandler("kur",cadirkur) I have got error at line 6.
JR10 Posted June 25, 2011 Posted June 25, 2011 What the error says?? EDIT: it is client i forgot here: function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y+3,z+3) local isim = getPlayerName(getLocalPlayer()) createObject(1678,x,y+3,z) dxDrawText (isim,sx,sy) end addCommandHandler("kur",cadirkur) and the text won't appear beacause it needs to be onClientRender.
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) createObject(1678,x,y+3,z) triggerEvent("onDX",getRootElement()) end addCommandHandler("kur",cadirkur) function Dx() x,y,z = getElementPosition(getLocalPlayer()) local isim = getPlayerName(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y+3,z+3) dxDrawText (isim,sx,sy) end addEvent ("onDX",true) Is this works?
JR10 Posted June 25, 2011 Posted June 25, 2011 No, function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) createObject(1678,x,y+3,z) addEventHandler('onClientRender', root, Dx) end addCommandHandler("kur",cadirkur) function Dx() x,y,z = getElementPosition(getLocalPlayer()) local isim = getPlayerName(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y+3,z+3) dxDrawText (isim,sx,sy) end
JR10 Posted June 25, 2011 Posted June 25, 2011 function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) createObject(1678,x,y+3,z) addEventHandler('onClientRender', root, Dx) end addCommandHandler("kur",cadirkur) function Dx() local x,y,z = getElementPosition(getLocalPlayer()) local isim = getPlayerName(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y+3,z+3) dxDrawText (isim,sx,sy) end
JR10 Posted June 25, 2011 Posted June 25, 2011 function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) createObject(1678,x,y+3,z) addEventHandler('onClientRender', root, Dx) end addCommandHandler("kur",cadirkur) function Dx() local x,y,z = getElementPosition(getLocalPlayer()) local isim = getPlayerName(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y,z+1) dxDrawText (isim,sx,sy-1) end
gokalpfirat Posted June 25, 2011 Author Posted June 25, 2011 When i do like tihs function cadirkur () local x,y,z = getElementPosition(getLocalPlayer()) cadir = createObject(1678,x,y+3,z) addEventHandler('onClientRender', root, Dx) end addCommandHandler("kur",cadirkur) function Dx() local x,y,z = getElementPosition(cadir) local isim = getPlayerName(getLocalPlayer()) local sx,sy = getScreenFromWorldPosition(x,y,z+1) dxDrawText (isim,sx,sy-1) end I get error at sy
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