Jump to content

[Question] How can I use dxDrawTextOnElement() in server-side scripts?


Kazafka

Recommended Posts

Sooo, how can I use (I think for you well known) dxDrawTextOnElement() (client-side function, MTA Wiki site: [click]) in server-side scripts?

I tried to export, plus this code:

addEventHandler("onPlayerChat", resourceRoot, function(message, type_)
	if(type_ == 0) then
		call(resourceRoot, "dxDrawTextOnElement", source, message, 1, 20, 255, 255, 255, 255, 1, "default-bold")
	end
end)

(export in meta.xml for proof):

<meta>
	<info author="VaporZ" name="VaporZ's utility [PL]" description="(desc)" type="script" version="1.0.1"/>
	
	<script src="cars.Lua" type="server"/>
	<script src="bank.Lua" type="server"/>
	<script src="utility.Lua" type="server"/>
	<script src="utility-c.Lua" type="client"/>
	<script src="testy.Lua" type="server"/>
	
	<file src="bank/accounts.xml"/>
	<file src="bank/atms.xml"/>
	
	<file src="cars/saved.xml"/>
	<file src="cars/shops.xml"/>
	
	<export function="dxDrawTextOnElement" type="client"/>
</meta>

But this don't work. Any ideas?

Okay, I got further, but still it's not good. Look at this one (console error): ERROR: systems\utility.Lua:108: call: failed to call 'systems:dxDrawTextOnElement'
 

Edited by VaporZ
Link to comment
  • IIYAMA locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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