Jump to content

CapY

Members
  • Posts

    1,646
  • Joined

  • Last visited

Everything posted by CapY

  1. CapY

    GUI Welcome Screen

    And one more question . I have resoulution 1280x1024 and i see that GUI window normal. My friend have resoulution 1024x768 and when he was joined the gui window has INCREASED to him, so he was unable to press OK button. Is there any adjust screen resoultion for gui ?
  2. CapY

    BANNER SCRIPT

    But how you know ? And i dont know how to add a timer....How this: "IDKWTFXD! - ".. "Visit Us At : http://www.blabla.com - ".. can show on the chatBox every 2 mins ?
  3. CapY

    BANNER SCRIPT

    What is wrong here ? Client Side: local X, Y = guiGetScreenSize() local MSG = "IDKWTFXD! - ".. "Visit Us At : [url=http://www.blabla.com]http://www.blabla.com[/url] - ".. local FONT = "sa-gothic" local FS = 0.68 local FH = dxGetFontHeight(FS, FONT) local HUD = { banner = dxText:create(MSG, X / 2, Y - FH + 10, false, FONT, FS, "center"), } HUD.banner:color(60, 60, 60, 255) HUD.banner:type('stroke', 1, 0, 255, 0, 255) dxText = {} dxText_mt = { __index = dxText } local idAssign,idPrefix = 0,"c" local g_screenX,g_screenY = guiGetScreenSize() local visibleText = {} ------ defaults = { fX = 0.5, fY = 0.5, bRelativePosition = true, strText = "", bVerticalAlign = "center", bHorizontalAlign = "center", tColor = {255,255,255,255}, fScale = 1, strFont = "default", strType = "normal", tAttributes = {}, bPostGUI = false, bClip = false, bWordWrap = true, bVisible = true, tBoundingBox = false, --If a bounding box is not set, it will not be used. bRelativeBoundingBox = true, } local validFonts = { default = true, ["default-bold"] = true, clear = true, arial = true, pricedown = true, bankgothic = true, diploma = true, beckett = true, } local validTypes = { normal = true, shadow = true, border = true, stroke = true, --Clone of border } local validAlignTypes = { center = true, left = true, right = true, } function dxText:create( text, x, y, relative, strFont, fScale, horzA ) assert(not self.fX, "attempt to call method 'create' (a nil value)") if ( type(text) ~= "string" ) or ( not tonumber(x) ) or ( not tonumber(y) ) then outputDebugString ( "dxText:create - Bad argument", 0, 112, 112, 112 ) return false end local new = {} setmetatable( new, dxText_mt ) --Add default settings for i,v in pairs(defaults) do new[i] = v end idAssign = idAssign + 1 new.id = idPrefix..idAssign new.strText = text or new.strText new.fX = x or new.fX new.fY = y or new.fY if type(relative) == "boolean" then new.bRelativePosition = relative end new:scale( fScale or new.fScale ) new:font( strFont or new.strFont ) new:align( horzA or new.bHorizontalAlign ) visibleText[new] = true return new end function dxText:text(text) if type(text) ~= "string" then return self.strText end self.strText = text return true end function dxText:position(x,y,relative) if not tonumber(x) then return self.fX, self.fY end self.fX = x self.fY = y if type(relative) == "boolean" then self.bRelativePosition = relative else self.bRelativePosition = true end return true end function dxText:color(r,g,b,a) if not tonumber(r) then return unpack(self.tColor) end g = g or self.tColor[2] b = b or self.tColor[3] a = a or self.tColor[4] self.tColor = { r,g,b,a } return true end function dxText:scale(scale) if not tonumber(scale) then return self.fScale end self.fScale = scale return true end function dxText:visible(bool) if type(bool) ~= "boolean" then return self.bVisible end if self.bVisible == bool then return end self.bVisible = bool if bool then visibleText[self] = true else visibleText[self] = nil end return true end function dxText:destroy() self.bDestroyed = true setmetatable( self, self ) return true end function dxText:font(font) if not validFonts[font] then return self.strFont end self.strFont = font return true end function dxText:postGUI(bool) if type(bool) ~= "boolean" then return self.bPostGUI end self.bPostGUI = bool return true end function dxText:clip(bool) if type(bool) ~= "boolean" then return self.bClip end self.bClip = bool return true end function dxText:wordWrap(bool) if type(bool) ~= "boolean" then return self.bWordWrap end self.bWordWrap = bool return true end function dxText:type(type,...) if not validTypes[type] then return self.strType, unpack(self.tAttributes) end self.strType = type self.tAttributes = {...} return true end function dxText:align(horzA, vertA) if not validAlignTypes[horzA] then return self.bHorizontalAlign, self.bVerticalAlign end vertA = vertA or self.bVerticalAlign self.bHorizontalAlign, self.bVerticalAlign = horzA, vertA return true end function dxText:boundingBox(left,top,right,bottom,relative) if left == nil then if self.tBoundingBox then return unpack(boundingBox) else return false end elseif tonumber(left) and tonumber(right) and tonumber(top) and tonumber(bottom) then self.tBoundingBox = {left,top,right,bottom} if type(relative) == "boolean" then self.bRelativeBoundingBox = relative else self.bRelativeBoundingBox = true end else self.tBoundingBox = false end return true end addEventHandler ( "onClientRender", getRootElement(), function() for self,_ in pairs(visibleText) do while true do if self.bDestroyed then visibleText[self] = nil break end if self.tColor[4] < 1 then break end local l,t,r,b --If we arent using a bounding box if not self.tBoundingBox then --Decide if we use relative or absolute local p_screenX,p_screenY = 1,1 if self.bRelativePosition then p_screenX,p_screenY = g_screenX,g_screenY end local fX,fY = (self.fX)*p_screenX,(self.fY)*p_screenY if self.bHorizontalAlign == "left" then l = fX r = fX + g_screenX elseif self.bHorizontalAlign == "right" then l = fX - g_screenX r = fX else l = fX - g_screenX r = fX + g_screenX end if self.bVerticalAlign == "top" then t = fY b = fY + g_screenY elseif self.bVerticalAlign == "bottom" then t = fY - g_screenY b = fY else t = fY - g_screenY b = fY + g_screenY end elseif type(self.tBoundingBox) == "table" then local b_screenX,b_screenY = 1,1 if self.bRelativeBoundingBox then b_screenX,b_screenY = g_screenX,g_screenY end l,t,r,b = self.tBoundingBox[1],self.tBoundingBox[2],self.tBoundingBox[3],self.tBoundingBox[4] l = l*b_screenX t = t*b_screenY r = r*b_screenX
  4. CapY

    MAP Compiling

    I didn't know, i was think it is in Client side -.- Btw. thanks for Info .
  5. CapY

    GUI Welcome Screen

    I was,but it didn't worked, but now works ...
  6. CapY

    MAP Compiling

    Hello. Is there any way to compile "MAP" files ?
  7. CapY

    GUI Welcome Screen

    And when i click fgGuiOkbutton Window disappears, but cursor is still ON.
  8. CapY

    GUI Welcome Screen

    It represents (nil value) here -.- IDK how to fix it. On guiEditor_Label[1] guiEditor_Label[1] = guiCreateLabel(8,355,1271,570,"",false,GUIFgWelcomeWindow) guiSetAlpha(GUIEditor_Label[1],1) guiLabelSetColor(GUIEditor_Label[1],0, 155 ,155) guiSetFont(GUIEditor_Label[1],"clear-normal")
  9. CapY

    GUI Welcome Screen

    Lol, fgot bout that -.-
  10. CapY

    GUI Welcome Screen

    Still nothing . -.-
  11. CapY

    GUI Welcome Screen

    It's runned in Client side ?
  12. https://wiki.multitheftauto.com/wiki/Ser ... _functions Ex. (press F8) run aclReload (without /) or something other ...
  13. Hey ! I have a little problem with welcome screen window.... It's dont want to start when player joins. CheckBox don't Work and Accept button doesn't works. -- Created: 02/07/2011 09:45 addEventHandler("onClientResourceStart",resourceRoot, function() guiEditor_Memo = {} guiEditor_Label = {} guiEditor_Image = {} guiFgWelcomeWindow = guiCreateWindow(77,262,1279,1023," R U L E S ! ",false) guiSetAlpha(GUIFgWelcomeWindow,1) guiWindowSetSizable(GUIFgWelcomeWindow,false) guiFgOkButton = guiCreateButton(564,943,172,59,"O K ! ",false,GUIFgWelcomeWindow) guiSetAlpha(GUIFgOkButton,1) guiSetFont(GUIFgOkButton,"clear-normal") guiFgImage = guiCreateStaticImage(9,21,1261,333,"images/FGOfficialLogo.png",false,GUIFgWelcomeWindow) guiEditor_Label[1] = guiCreateLabel(8,355,1271,570,"",false,GUIFgWelcomeWindow) guiSetAlpha(GUIEditor_Label[1],1) guiLabelSetColor(GUIEditor_Label[1],0, 155 ,155) guiSetFont(GUIEditor_Label[1],"clear-normal") guiFgRulesMemo = guiCreateMemo(2,5,1265,565," [FG] Rules !\n\n\n\n\n\n**********************************************************************************************************************************************************************************\n T H I S I S A F R E E R O A M !!!\n\n*DO NOT ADVERTISE !\n\n\n*DO NOT SPAM THE CHAT !\n\n\n*DO NO SPAM VEHICLES ! \n\n\n*DO NOT BE ANNOYING !\n\n\n*BE NICE, RESPECT OTHERS !\n\n\n*DO NOT USE HACKS, CHEATS OR HANDLING CFG !\n\n\n***************************************************************\n\nAbove all, Have fun ! \n\n",false,GUIEditor_Label[1]) guiMemoSetReadOnly(GUIFgRulesMemo,true) guiEditor_Image[1] = guiCreateStaticImage(19,953,91,56,"images/shruk.png",false,GUIFgWelcomeWindow) guiFgCheckBox = guiCreateCheckBox(398,940,343,72,"",false,false,GUIFgWelcomeWindow) guiCheckBoxSetSelected(GUIFgCheckBox,true) guiEditor_Memo[1] = guiCreateMemo(15,3,148,37,"I accept these Rules ! ",false,GUIFgCheckBox) end ) addEventHandler ( "onClientGUIClick", guiFgOkButton ) addEventHandler ( "onClientClick", getRootElement(), guiFgOkButton )
  14. You must have something to RUN, not just /run and..... do it with F8
  15. Nice ! I will be buy one host from you, as i see you have good offers and CHEAP hosting !
  16. Can i trust to serverFFS hosts ?
  17. yes, we payed and then they deleted server, and sayd that we dont agree that 1 server gots 2-3 owners. ( god damnt, they dont have subaccoutn sys, so we have to give passwords to other peoples! ) Even stoled our 3 eur. You didn't read TERMS OF SERVICE ! You are screwed yourself dude ...
  18. Can we have FTP file access when we buy that host ?
×
×
  • Create New...