Jump to content

Zuher Laith

Members
  • Posts

    148
  • Joined

  • Last visited

Everything posted by Zuher Laith

  1. @MoDeR2014 Still Gives Warnings .. Bad argument @ 'guiSetText' [Expected gui-element at argument 1, got boolean] Full Code: wndMain = { 'wnd', text = ' لوحة تحكم الاعب ', x = 10, y = 150, width = 277, controls = { element1 = {'lbl', text = 'Your Name: ' .. getPlayerName(g_Me) .. ' '}, element2 = {'lbl', text = 'Your Ping: ' .. getPlayerPing(g_Me) .. ' '}, {'br'}, element3 = {'lbl', text = 'Your Money: ' .. getPlayerMoney(g_Me) .. ' $'}, {'br'}, -- etc .. }, oncreate = mainWndShow, onclose = mainWndClose } setTimer( function() guiSetText (getControl(wndMain,"element1"), "Your Name: "..getPlayerName(localPlayer)); guiSetText (getControl(wndMain,"element2"), "Your Ping: "..getPlayerPing(localPlayer)); guiSetText (getControl(wndMain,"element3"), "Your Money: "..getPlayerMoney(localPlayer)); end, 1000, 0 ) Please Help
  2. @tosfera & Nicktim. Well .. The GUI Object set's the Location of the 3 Label's to the Down (Footer) Of the Window Here's an Image: *BEFORE* > *AFTER* The Timer Func Didn't Worked at All .. The Full Code: wndMain = { 'wnd', text = 'Player Panel', x = 10, y = 150, width = 277, controls = { element1 = {'lbl', text = 'Your Name: ' .. getPlayerName(g_Me) .. ' '}, element2 = {'lbl', text = 'Your Ping: ' .. getPlayerPing(g_Me)) .. ' '}, {'br'}, element3 = {'lbl', text = 'Your Money: ' .. getPlayerMoney(g_Me) .. ' $'}, -- etc .. }, oncreate = mainWndShow, onclose = mainWndClose } setTimer ( function() guiSetText ( element1, ""..getPlayerName ( localPlayer ) ); guiSetText ( element2, ""..getPlayerPing ( localPlayer ) ); guiSetText ( element3, ""..getPlayerMoney ( localPlayer ) ); end, 1000, 0 ) Remember I am using this code in Client Side.
  3. Hi Again .. Next Day of the Problem Discovered .. It Seems the Problem Automatically Solved @@" I'am Pretty Shore the Problem was because of my ISP .. Thanks Everyone.
  4. @tosfera I guess the Freeroam looks pretty different of Designing Side .. wndMain = { 'wnd', text = 'Player Panel', x = 10, y = 150, width = 277, controls = { {'lbl', id='namelbl', text = 'Your Name: ' .. getPlayerName(g_Me) .. ' '}, {'lbl', id='pinglbl', text = 'Your Ping: ' .. getPlayerPing(g_Me) .. ' '}, {'br'}, {'lbl', id='moneylbl', text = 'Your Money: ' .. getPlayerMoney(g_Me) .. ' $'}, -- etc .. } setTimer ( function() guiSetText ( "namelbl", getPlayerName ( localPlayer ) ); guiSetText ( "pinglbl", getPlayerPing ( localPlayer ) ); guiSetText ( "moneylbl", getPlayerMoney ( localPlayer ) ); end, 1000, 0 ); but the DebugScript is Mentioning the "namelbl" , "pinglbl" , "moneylbl" is it missing something ? Or i am Setting Timer in the Wrong Location ? ..
  5. Well .. I Checked on More than Browser, Computer , Also the Phone but didn't worked Is it might be because of the Network Provider or Something ? ..
  6. Hi .. I'am from Iraq, I Was using this site since one year with no problem .. Yesterday It was working fine ! and today, All MTA Site's are not Opening for me .. here is the Error Page: This webpage is not available DNS_PROBE_FINISHED_NXDOMAIN Then, I Tried to Use VPN, The Site Works Correctly ! So my Question is , Does "Iraq" Area is Banned in MTA site? I Hope i can get a answer for this , Soon as possible.
  7. Hi .. Recently I Decided to Add Feature's to Freeroam Panel .. Like Getting Player Name, Ping, Money, etc. Here is a Part of my Edit's: So this Code Give's The Value's Only On Panel Resource Start .. I Want to make it work by Timer or something .. here's what i tried: setTimer(getPedArmor(g_Me),2000,0) am I working with the Wrong Code or something else? Please help ..
  8. @Dealman LOL Didn't Noticed That because of the Notepad ++ .. @tosfera You're Awesome .. Thanks for Help ! Problem Solved.
  9. @tosfera i changed the font size to 9 , never mind. On debug script , here is the error: WARNING: business\dxgui\dxgui\elements\dx_text.lua:82: Bad argument @ 'dxDrawText' [Expected dx-font at argument 8, got nil and here is the Code that have an error: function dxText:draw ( ) dxDrawText(self.text, self.x, self.y, self.x + self.width, self.y + self.height, tocolor(unpack(self.color)), self.scale, self.font, self.alignX, self.alignY, self.clip, self.wordbreak, false) end & here's a Look of the Full Code of dx_text.lua: outputChatBox Give's a Value's or Something .. userdata: 09A8D928 userdata: 09A89008 userdata: 09A93170 userdata: 09A8AF98 userdata: 09A8CE88 userdata: 09B9FAB8 userdata: 09B97C28 userdata: 09BA6D68 userdata: 09BA2740 userdata: 09B9F018 userdata: 09B99A50 userdata: 09B9DCE0 userdata: 09B9B5A8 userdata: 09B9E2A8 userdata: 09B9A9F0 userdata: 09B99C80 userdata: 09B99D70
  10. Well .. "dxgui/dxgui/elements/Font.ttf" type="client" /> I guess Nothing wrong here right ? maybe i'am putting the font in wrong path or something ? ..
  11. Thanks for the Tip . Problem Solved.
  12. Greetings .. So I have a problem with my Function It Doesn't outputChatBox , but it works correctly: function trailerDetach () if source == vaunu then outputChatBox ("Mission Failed, Please Try Again.", source, 255, 255, 255, true) --destroyThings destroyElement (rekka) destroyElement (vaunu) destroyElement (finish) destroyElement (blip) --removeEventHandlers removeEventHandler ("onTrailerDetach", getRootElement(), trailerDetach) removeEventHandler ("onVehicleExit", getRootElement(), vehicleExit) removeEventHandler ("onPlayerQuit", getRootElement(), onQuit) --other startBlip = createBlip (2776.9, -2423.9, 12.7, 51) setElementPosition (marker, 2776.6, -2425.5, 12.6) else return false end end The Mod Only have a Server Side Why The OutputChatBox Doesn't do anything ? am i missing something ? Please help ..
  13. @tosfera There is Some Responding .. debugscript Give's "File Not Found" . File Name: "Font.ttf" META #1 (Main) META #2 (Dx Library Meta) So Here's The Basic Script Map: Image
  14. The OutputChatBox Send "false" to chat. Here is an Image Preview The Lua Code: function dxText:create ( x, y, width, height, text, parent ) if not (x and y and width and height) then return; end local self = setmetatable({}, {__index = self}) local myFont = dxCreateFont( "Font.ttf", 2 ) outputChatBox ( tostring ( myFont ) ) self.type = "text" self.text = text or ""; self.x = x self.y = y self.width = width self.height = height self.font = myFont --self.scale = 1 self.alignX = "left" self.alignY = "top" self.clip = false self.wordbreak = false self.color = {255, 255, 255, 255} self.visible = true self.render = true if parent then self.render = false self.parent = parent table.insert(parent.children, self) end table.insert(dxObjects, self) return self end
  15. I See .. It's really Helpful, but might be not the Right Topic for it .
  16. Still The Same Problem .. function dxText:create ( x, y, width, height, text, parent ) if not (x and y and width and height) then return; end local self = setmetatable({}, {__index = self}) local myFont = dxCreateFont( "Font.ttf", 2 ) self.type = "text" self.text = text or ""; self.x = x self.y = y self.width = width self.height = height self.font = myFont --self.scale = 1 self.alignX = "left" self.alignY = "top" self.clip = false self.wordbreak = false self.color = {255, 255, 255, 255} self.visible = true self.render = true if parent then self.render = false self.parent = parent table.insert(parent.children, self) end table.insert(dxObjects, self) return self end dxText.new = dxText.create; Debug Script Error: WARNING: business\dxgui\dxgui\elements\dx_text.lua:73: Bad argument @ 'dxDrawText' [Expected dx-font at argument 8, got boolean
  17. Greetings .. I'am looking for a way to make First-Person Mod in a Car In bindkey .. here is what i tried: So this Code Works Great .. Except it Use's onClientCursorMove .. Which is ANNOYING .. I Want to Change it On Steering Wheel Right/Left Just like That: function getPointFromDistanceRotation(x,y,dist,angle) local a=math.rad(90-angle) local dx=math.cos(a)*dist local dy=math.sin(a)*dist return x+dx,y+dy end if getControlState"left" or getControlState"right" then local _,_,Zrot=getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) wx,wy=getPointFromDistanceRotation(cx,cy,((cx-wx)^2+(cy-wy)^2)^0.5,Zrot) end There is Similar Topic Old & Already Asked, but Unsolved So , any way to make this works please ? ..
  18. Yes it Also Works , Thanks for the tip. Problem Solved.
  19. Try this last post. Why would you link them to the VC forum..? because it's the same problem & the Same point ..
×
×
  • Create New...