-
Posts
524 -
Joined
-
Last visited
Everything posted by UAEpro
-
yes .. that what i do ^.^
-
just use my textlib you don't have to edit any line 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 b = b*b_screenY end local type,att1,att2,att3,att4,att5 = self:type() if type == "border" or type == "stroke" then att2 = att2 or 0 att3 = att3 or 0 att4 = att4 or 0 att5 = att5 or self.tColor[4] outlinesize = att1 or 2 if outlinesize > 0 then for offsetX=-outlinesize,outlinesize,outlinesize do for offsetY=-outlinesize,outlinesize,outlinesize do if not (offsetX == 0 and offsetY == 0) then self.strText2 = string.gsub(self.strText, "#%x%x%x%x%x%x", "")
-
it's Nice for clan war between clans it was useful for me to arrange and view the score easily Thanks anyway I edited post to add "Good work though", but I haven't pressed the button. Epic fail. Does it support classic races too? ummmm let's me think for one minute .... No it doesn't but i will add the feature next week
-
lol ... that's why there is a later button
-
or add in any server side script exports.scoreboard:removeScoreboardColumn('race rank') exports.scoreboard:removeScoreboardColumn('checkpoint')
-
ahh i know what you are talking about just edit the scoreboard setting and put true to enable colored nickname
-
i made this script to learn how i can use sql things Features: # Rate When Dead - Each player can rate each map when he wasted # Later - if he doesn't want to rate now he can rate it later # GUI - Nice Gui picture # SQL - save value in the DB # Rate display - You can see the rate in the chat for Race only by Ghosts/#UAEpro
-
it's Nice for clan war between clans it was useful for me to arrange and view the score easily Thanks anyway
-
i feel boring ... i feel like i want to quit scripting so I'm trying to releases some of my script to force my self to make new scripts for my server and thanks
-
Amazing Radio player with an amazing volume slider you can add unlimited radio channels or song by editing channels.lua just add a line on the table {"Radio Name"," Radio URL","Language"}, for example {"Virgin Radio Dubai","http://www.vtuner.com/vtunerweb/mms/m3u28578.m3u","English"}, download @ https://community.multitheftauto.com/index.php?p= ... ls&id=3578
-
Original Clanwar Resource By -XIII-Goomba v1.0 Clan War 2 developed by Ghosts/#UAEpro Features: # Spectators team - Get automatically killed on a map start # Can Change teams easly via F2 # Nice graphics for score # Auto team winner score adder # Auto map counter # Can edit the score and maps left by a simple GUI # and many more new things Player Commands: F2 - Join or Change Team Admin Commands: F1 - Admin setting Changing Team Settings: Go to admin panel > resources tab. Select the Clanwar resource, press settings. Note: For the admin commands you have to set the admin groups in the settings. download https://community.multitheftauto.com/index.php?p= ... ls&id=3577
-
easy the original code was for dxdrawcolortext and i made this for colored label --- by UAEpro function guiCreateColorLabel(ax, ay, bx, by,str, parent, bool) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then r,g,b = tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap) avc321 = guiCreateLabel(ax, ay, ax + w, by,cap,parent, bool) if r == nil then r = 255 end if g == nil then g = 255 end if b == nil then b = 255 end guiLabelSetColor(avc321,r,g,b) ax = ax + w r,g,b = tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap) avc123 = guiCreateLabel(ax, ay, ax + w, by,cap,parent, bool) guiLabelSetColor(avc123,r,g,b) end end
-
Just compile the script which sends information to the my sql
-
Nice .. i really liked the idea and the design .. but i wish that you add Group chat and players info .. like in what server they are also if you add an option players can type their personal information and choose if they want it private or puplic also if u add an option to let players choose the font and the color
-
my server Ghosts|Race [DD/DM] [24/7] spam server Ghosts/Race [Gehot 3zooz] 24/7
-
fileCreate, fileOpen, fileWrite, fileClose i know .. but it will not go to log folder .. it will be in the same resource i tried to use "././" to go back .. but it didn't work for me for the 1st thing ... the playSound function i cant achieve it via scripting .. because i think to support new format we need to edit the game core only if i use program to stearm radio through the internet and taking the source from something not spported from mtasa and the output will be s3m .. then it will work but also it will kill my bandwidth
-
Hi playSound support MP3, WAV, OGG, RIFF, MOD, XM, IT and S3M only why not to add more. . for example flv or swf because many radio station stream across swf player or flv if we could just embed the swf player so we can listen to the music ^.^ or add asf Many many radio station use asf and you can play asf through windows media player 2- why not to add new log sorter or for example onPlayerChat outputCustomLog(***.txt,message) so we can read the chat easily another example function sendingMonet() ... outputCustomLog(moneySender.txt,WhoSend .."Send".. Amount .."$ to ".. Receiver) so i can know who send to who .. and how many he sent .. that will make things easier ^.^
-
حلوها بالابديت اليديد .. تقريبا
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
UAEpro replied to darkdreamingdan's topic in News
not from the resource .. from the server when enable voice thing .. -
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
UAEpro replied to darkdreamingdan's topic in News
crash everytime Version = 1.1-release-3055.0.000 Time = Thu Aug 25 05:20:21 2011 Module = C:\Windows\SYSTEM32\ntdll.dll Code = 0xC0000005 Offset = 0x00052D37 EAX=00000000 EBX=1F56EC00 ECX=031F0000 EDX=1F56EC00 ESI=32726424 EDI=1F56EBF8 EBP=0022FC5C ESP=0022FC28 EIP=77772D37 FLG=00210206 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000 Bugs - when create new team with utf-8 language like arabic .. we cant move any player to that team or delete it and when we delete it .. CRASH - Crash in most of race maps .. idk why - Every time when i want to move someone to team .. CRASH x_X - Kicked from the game (VF #6 B03-Z00) << its my server When i closed the voice .. everything ok until now that mean there is a bug in the voice thingy can someone report this -
yea i know ... i wrote that ..
-
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
UAEpro replied to darkdreamingdan's topic in News
this is a small script by me .. idea by AlJabal from long time ^.^ this add smal picture at the bottom of your server to advert for the new MTAsa noob picture i know this is the link http://www.mediafire.com/?jx5o3bfvws96685 -
MTA:SA 1.1 Released: Harder, Better, Stronger, Faster
UAEpro replied to darkdreamingdan's topic in News
Nice .. but now ,, how we can move our server and tell the players to download the new one -
Awesome ... but i got same version but original one from you <3
