gokalpfirat Posted June 25, 2011 Share 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?) Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 Edit: I find custom blips but dxtext top of Marker? Link to comment
[DemoN] Posted June 25, 2011 Share Posted June 25, 2011 https://community.multitheftauto.com/ind ... ls&id=1960 You can use that script... Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 I think i want code:) Link to comment
SDK Posted June 25, 2011 Share Posted June 25, 2011 I want cake DemoN linked to the wrong resource: https://community.multitheftauto.com/index.php?p= ... ils&id=960 Link to comment
[DemoN] Posted June 25, 2011 Share 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 Link to comment
SDK Posted June 25, 2011 Share Posted June 25, 2011 Ah, I thought you linked to the wrong one since there id's are almost the same Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 I dont want to give a script what i want i want only example and function do this. Link to comment
JR10 Posted June 25, 2011 Share 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 Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 Thans JR10 you always help me and others:) Link to comment
DarkLink Posted June 25, 2011 Share 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 Link to comment
will briggs Posted June 25, 2011 Share Posted June 25, 2011 LOL JR10 - The super helper.... That should be your sig Link to comment
JR10 Posted June 25, 2011 Share Posted June 25, 2011 LOL JR10 - The super helper....That should be your sig ROFL. Link to comment
gokalpfirat Posted June 25, 2011 Author Share 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. Link to comment
JR10 Posted June 25, 2011 Share 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. Link to comment
gokalpfirat Posted June 25, 2011 Author Share 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? Link to comment
JR10 Posted June 25, 2011 Share 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 Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 Line 12 badargument dxDrawText. Link to comment
JR10 Posted June 25, 2011 Share 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 Link to comment
gokalpfirat Posted June 25, 2011 Author Share Posted June 25, 2011 Im getting line 12 badargument again. Link to comment
JR10 Posted June 25, 2011 Share 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 Link to comment
gokalpfirat Posted June 25, 2011 Author Share 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 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