Jump to content

x[ مشكلة ]x في مود كتابة الاسماء


Recommended Posts


ألسلام عليكم 

هذا مود يـظهر أسماء في بعض الاماكن
تروح مثلا مكـانـة الإسعاف تشـوف مكـتـوب الإسعاف ! ولكن ظهر خطاء ماعرف ما سبب! وكيف اصلحة

ألـكـود
 

---------------------------------------------------------
local screenWidth, screenHeight = guiGetScreenSize() 
local screenX , screenY = guiGetScreenSize ( )
---------------------------------------------------------

local TeamsDraw = {
	{text="الخاطف", tx="1880", ty="-1736.69", tz="14.75", r="150", g="0", b="0"}, 
	{text="الإسعاف", tx="", ty="-1100.61", tz="15.03", r="0", g="255", b="255"},
 }
 
function leaderText()
	for a,b in pairs(TeamsDraw) do
		xx = tostring(b["tx"])
		yy = tostring(b["ty"])
		zz = tostring(b["tz"])
		local x,y = getScreenFromWorldPosition(xx, yy, zz+0.8)
		local camX,camY,camZ = getCameraMatrix()
		if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xx, yy, zz) <= 20) then
		   dxDrawFramedText ( b["text"] , x , y , x , y , tocolor (b["r"], b["g"], b["b"], 255) , ( screenX / 1440 ) * 2 , "default-bold" , "center" , "center" , false , true , false )
		end
	end
end
addEventHandler("onClientPreRender", root, leaderText)


function dxDrawFramedText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI )
	dxDrawText ( message , left + 1 , top + 1 , width + 1 , height + 1 , tocolor ( 0 , 0 , 0 , 255 ) , scale , font , alignX , alignY , clip , wordBreak , postGUI )
	dxDrawText ( message , left + 1 , top - 1 , width + 1 , height - 1 , tocolor ( 0 , 0 , 0 , 255 ) , scale , font , alignX , alignY , clip , wordBreak , postGUI )
	dxDrawText ( message , left - 1 , top + 1 , width - 1 , height + 1 , tocolor ( 0 , 0 , 0 , 255 ) , scale , font , alignX , alignY , clip , wordBreak , postGUI )
	dxDrawText ( message , left - 1 , top - 1 , width - 1 , height - 1 , tocolor ( 0 , 0 , 0 , 255 ) , scale , font , alignX , alignY , clip , wordBreak , postGUI )
	dxDrawText ( message , left , top , width , height , color , scale , font , alignX , alignY , clip , wordBreak , postGUI )
end

 addEventHandler("onClientResourceStart",resourceRoot,function ()
	fileDelete("DxPedS.lua")
end )


المشكلة :

16: Expected number, get non-convertible string. This warning may be an error in future versions.
16: Expected number, get non-convertible string. This warning may be an error in future versions. [DUP x86]
16: Expected number, get non-convertible string. This warning may be an error in future versions.
16: Expected number, get non-convertible string. This warning may be an error in future versions. [DUP x30]

16 سـطـر

 

		local x,y = getScreenFromWorldPosition(xx, yy, zz+0.8)

ما سبب مشكلة ؟ وكيف اصلحها ؟ شكراً

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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