Mr.OppS Posted May 19, 2017 Share Posted May 19, 2017 ألسلام عليكم هذا مود يـظهر أسماء في بعض الاماكن تروح مثلا مكـانـة الإسعاف تشـوف مكـتـوب الإسعاف ! ولكن ظهر خطاء ماعرف ما سبب! وكيف اصلحة ألـكـود --------------------------------------------------------- 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
AE. Posted May 19, 2017 Share Posted May 19, 2017 xx = tonumber(b["tx"]) yy = tonumber(b["ty"]) zz = tonumber(b["tz"]) بدل ال3 سطور دول ب سطر13 و 14 و 15 Link to comment
Mr.OppS Posted May 19, 2017 Author Share Posted May 19, 2017 9 hours ago, 3laa33 said: xx = tonumber(b["tx"]) yy = tonumber(b["ty"]) zz = tonumber(b["tz"]) بدل ال3 سطور دول ب سطر13 و 14 و 15 شـكـراً 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