Jump to content

FatalTerror

Members
  • Posts

    304
  • Joined

  • Last visited

Everything posted by FatalTerror

  1. Like that ? addEventHandler("onPlayerChat", getRootElement(), function(message, messageType) if message then if(string.find(message, "warp me to"))then local player = gettok ( message, 4, string.byte(' ') ) outputChatBox("Okey ! Warp now !") executeCommandHandler ( "warp", player, source ) end end end)
  2. The setTimer don't give the element source... Try that addEventHandler("onPlayerJoin", getRootElement(), function() setTimer(function(source) if source then givePlayerMoney(source, 1000) end end, 80000, 1, source) end) Edit: If you want give a cash for the player every 80000ms, you change the frequence value addEventHandler("onPlayerJoin", getRootElement(), function() setTimer(function(source) if source then givePlayerMoney(source, 1000) end end, 80000, 0, source) end)
  3. local musics = { [ 'David Guetta - Where Dem Girls At' ] = 'http://199.167.195.194/wdga.mp3', [ 'Coldplay - Paradise' ] = 'http://199.167.195.194/pd.mp3', [ 'Coldplay - Viva la Vida' ] = 'http://199.167.195.194/vlv.mp3', [ 'Ana Malhoa - Danza Kuduro' ] = 'http://199.167.195.194/dk.mp3', [ 'Klaas - The Way' ] = 'http://199.167.195.194/tw.mp3', [ 'Basshunter - All I ever wanted' ] = 'gfx/music/bh-aiew.mp3', [ 'Whiz Khalifa - Black and Yellow' ] = 'gfx/music/wk-bay.mp3', [ 'Skrillex - My name is Skrillex ( Remix )' ] = 'gfx/music/sx-mnis.mp3', [ 'Italobrothers - Stamp on the Ground' ] = 'gfx/music/ib-sotg.mp3', [ 'Madcon - Freaky like Me' ] = 'gfx/music/mc-flm.mp3', [ 'Cut the Music - Greatest Deejay' ] = 'gfx/music/ctm-gd.mp3', [ 'No Name - Time`s Vortex' ] = 'gfx/music/tv.mp3', [ 'Manian - Welcome to the Club' ] = 'gfx/music/wttc.mp3', [ 'Bon Jovi - It`s my Life' ] = 'gfx/music/iml.mp3', [ 'Example - Changed the Way you Kissed Me' ] = 'gfx/music/ctwykm.mp3', [ 'Example - Kickstart ( Bar 9 Remix )' ] = 'gfx/music/e-ksb9rx.mp3', [ 'Ellie Goulding - Lights ( Remix )' ] = 'http://199.167.195.194/Lights.mp3', [ 'Arkasia - New World Disorder' ] = '', [ 'ATB - You are not Alone ( Remix )' ] = '' } local themusic = musics[math.random(0, #musics)]
  4. It's good idea, but it's home made An better scripter will edit that for add it as default resources. I will be happy if this resource is on default Maked: Accounts management (create & delet account if the player don't want use) You can see every player has use the script for the moment here. I'm alone !
  5. Like that ? Client-side: local nameimage = "rank" addEvent("yourEvent", true) addEventHandler("yourEvent", getRootElement(), function(rank) if rank then addEventHandler("onClientRender", getRootElement(), function() dxDrawImage(drawX-1, drawY-1, width+2, height+2, "img/"..nameimage..rank..".png" ) end) end end) Server side: triggerClientEvent("yourEvent", getRootElement(), rank)
  6. https://community.multitheftauto.com/ind ... ls&id=2478
  7. Steps: 1.You need register in community center. 2.Login in bug tracker. 3.Search right top corner title "Project" and select "New Issues" 4.Search center button "Report Issue". 5.Report Done
  8. The ressource must have admin rights. Set it on ACL https://wiki.multitheftauto.com/wiki/ACL
  9. Epic fail... Sorry Remplace "getResoruceFromName" per "getResourceFromName" marker = createMarker (222, -1956, 1, "cylinder", 1.5, 38, 255, 0, 255, getRootElement()) toxogletb = 0 addEventHandler("onMarkerHit", getRootElement(), function(markerHit) local resource = getResourceFromName("mil_protection") -- Resource to stop if(source == marker)then if (getElementType(markerHit) == "player")then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(markerHit)), aclGetGroup ( "Admin" ) ) then if (toxogletb == 0) then startResource (resource) elseif (toxogletb == 1) then stopResource (resource) end end end end end)
  10. Like that? marker = createMarker (222, -1956, 1, "cylinder", 1.5, 38, 255, 0, 255, getRootElement()) toxogletb = 0 addEventHandler("onMarkerHit", getRootElement(), function(markerHit) local resource = getResoruceFromName("mil_protection") -- Resource to stop if(source == marker)then if (getElementType(markerHit) == "player")then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(markerHit)), aclGetGroup ( "Admin" ) ) then if (toxogletb == 0) then startResource (resource) elseif (toxogletb == 1) then stopResource (resource) end end end end end)
  11. Hm no Edit: it's not a bug... it's just a question
  12. Hi, I wonder if it's possible to display an image from a site on MTA. I know that with PlaySound () is possible, but for images? If somebody know if it's possible, say me Thanks.
  13. Like that ? local vehicles = { {model=411, x=0, y=0, z=3, rot=0} } addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() for index, vehicle in ipairs(vehicles) do local car = createVehicle(vehicle.model, vehicle.x, vehicle.y, vehicle.z, 0, 0, vehicle.rot) addEventHandler("onVehicleEnter", getRootElement(), function() if(source == car)then outputChatBox("You have entered the vehicle") end end) end end)
  14. +1 If it's the Awwu modification you must his autorisation or add his name in the description when you will upload that in community ...
  15. Yep Maked: Animations for the interface
  16. Yes, I would ensure that does not happen Do not worry, I will find a solution.
  17. addEventHandler("onClientGUIClick", getRootElement(), function() if(source == gui["test"])then executeCommandHandler("hptoll2c") end end) Edit: the command "hptoll2c" exist?
  18. Like that ? stopSound(musics['Music Name']) or for i, song in ipairs(musics)do stopSound(song) end
  19. This is what I was saying on page 1, but maybe he have features that xfire doesnt have.. but I dont think so Anyway like I said before, good effort ! XFire is a software, which uses dx overlay. This is a script. XFire can access microphone. This can't. It's a major difference, which makes this script useless. For example, have much nuubs don't know how install a simple programm like XFire. My script doesn't require installation but the server owner must have the script in his server My script is simple to use, it's my opinon. If you want use XFire for talk with your friend, it's your problem
  20. urfont = dxCreateFont("urfont.ttf",13) dxText = {} dxText_mt = { __index = dxText } local idAssign,idPrefix = 0,"c" local g_screenX,g_screenY = guiGetScreenSize() local visibleText = {} ------ defaults = { fX = 0.7, fY = 0.5, bRelativePosition = true, strText = "", bVerticalAlign = "center", bHorizontalAlign = "center", tColor = {255,0,0,255}, fScale = 0.0, strFont = "default", strType = "default", 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, urfont = 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, 255, 0, 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 string.lower(type(font)) ~= "string" and 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
  21. Yes it's in-game and it's not same as xfire. Thanks everybody
  22. Yep it will use callRemote & MySQL The messages will be stored in a MySQL database, and every server will connect in this database to get informations. (messages, online players, profile details, ...)
×
×
  • Create New...