-
Posts
114 -
Joined
-
Last visited
Everything posted by SkiZo
-
Hello, So, I'm trying to add more killmessages .. can some one help me .. it shows only 5 messages! i did not find the code .. or the place help please <3
-
Thank You !! That remove the distance Thank You That Able the Colors
-
srfont = dxCreateFont("newfont.TTF",7) dxText = {} dxText_mt = { __index = dxText } local idAssign,idPrefix = 0,"c" local g_screenX,g_screenY = guiGetScreenSize() local visibleText = {} ------ local defaults = { fX = 0.5, fY = 0.5, bRelativePosition = true, strText = "", bVerticalAlign = "center", bHorizontalAlign = "center", tColor = {255,255,255,255}, fScale = 1, strFont = "bankgothic", 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 = false, --Clone of border } local validAlignTypes = { center = true, left = true, right = true, } function dxText:create( text, x, y, relative ) 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 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 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:extent() local extent = dxGetTextWidth ( self.strText, self.fScale, self.strFont ) if self.strType == "stroke" or self.strType == "border" then extent = extent + self.tAttributes[1] end return extent end function dxText:height() local height = dxGetFontHeight ( self.fScale, self.strFont ) if self.strType == "stroke" or self.strType == "border" then height = height + self.tAttributes[1] end return height 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 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 outlinesize = math.min(self.fScale,outlinesize) if outlinesize > 0 then for offsetX=-outlinesize,outlinesize,outlinesize do for offsetY=-outlinesize,outlinesize,outlinesize do if not (offsetX == 0 and offsetY == 0) then dxDrawText(self.strText:gsub("#%x%x%x%x%x%x", ""), l + offsetX, t + offsetY, r + offsetX, b + offsetY, tocolor(att2, att3, att4, att5), self.fScale, srfont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) end end end end elseif type == "shadow" then local shadowDist = att1 att2 = att2 or 0 att3 = att3 or 0 att4 = att4 or 0 att5 = att5 or self.tColor[4] dxDrawText(self.strText:gsub("#%x%x%x%x%x%x", ""), l + shadowDist, t + shadowDist, r + shadowDist, b + shadowDist, tocolor(att2, att3, att4, att5), self.fScale, srfont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) end dxDrawText ( self.strText:gsub("#%x%x%x%x%x%x", ""), l, t, r, b, tocolor(unpack(self.tColor)), self.fScale, srfont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) break end end end ) if addEvent ( "updateDisplays", true ) then addEventHandler ( "updateDisplays", getRootElement(), function(self) setmetatable( self, dxText_mt ) for text,_ in pairs(visibleText) do if text.id == self.id then visibleText[text] = nil end end if self.bVisible and not self.bDestroyed then visibleText[self] = true end end ) end function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) end This Is Full Code I Hope we Find Solution
-
I Just now posted looking for help too !
-
So, i'm trying to make killmessages colored From To Well i succeded at this But when i change font to my own font .. it's looks like this How can i remove that Distance ? !!!! when i remove code Colors work as well ! i just need to know how to able the colors again ! HELP !
-
The Boss Have RPG now but he don't shoot .. i looked for solution and my only solution is useing Client side part .. createProjectile Work only in Client side ... #NOT WORKING help ! :'s giveWeapon ??? is BOT ! nemesistest = exports [ "slothBot" ]:spawnBot ( 1129, -1489, 22.8, 90, 100, 0, 0, NemesisTest, 35, "hunting", true ) 35 = Rocket Luncher
-
Hello, I'm trying to Make Boss Have Rocket luncher ( i tried so much but nothing work ) . Anyway , Server Side function NemesisTest ( ) nemesistest = exports [ "slothBot" ]:spawnBot ( 1129, -1489, 22.8, 90, 100, 0, 0, NemesisTest, 35, "hunting", true ) -- nemesistestc= exports [ "dxmessages" ]:outputDx(root,"BOSS TEST SPAWN","warning") -- baz = createObject ( 360, 622.4934082031, -847.33459472656, 75.0484313964, 0, 0, 0 ) -- attachElements ( baz, nemesistest, 0.2, 0.1, 0.5, 0, 90, 0 ) -- triggerClientEvent ( root, "nemesismissel", root ) triggerClientEvent ( "nemesismissel", root ) BlipNemesisTest = createBlipAttachedTo ( nemesistest, 23 ) -- triggerClientEvent ( root, "BossSpawn", root ) -- setElementData(nemesistest, "nemesistest",true) outputChatBox ( "BOSS TEST SPAWN",getRootElement(), 0, 255, 0, true ) if nemesistest then exports.extra_health:setElementExtraHealth ( nemesistest, 1 ) end end Client Side addEvent ( "nemesismissel", true ) addEventHandler ( "nemesismissel", root, function ( ) x, y, z = getElementPosition("nemesistest") createProjectile(getLocalPlayer(), 19, x, y, z) setPedAnimation ( nemesistest, "ROCKET", "RocketFire") end ) Can Someone Help me ?
-
Thanks For Helping But this Is Not The Function That I Need ... Okey I Will test It
-
Hello everyone .. i'm creating a Moderator Panel .. I Create Botton to kick player and work :)) Look at the photo please .. http://prntscr.com/fgu4r4 when i typing .. if i press T i start writing in main chat .. Y in Team chat .. just it stop writing the reason and start write outside the panel .. anyone can help me please ?
-
Hello Guys .. I Hope that you are fine :)) I Need some help here .. I don't know where is the Problem here i tried i lot and got tired so i need help please :)) function chat(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Moderator")) then outputChatBox("Press 'm' To Open Your Moderator Panel", thePlayer, 0, 255, 0, false) else end end addEventHandler("onPlayerLogin",getRootElement(),chat) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),chat) Bad argument @ 'getAccountName' Bad argument @ 'getPlayerAccount'
-
Hello everyone .. i need some help .. car1 = createVehicle ( 451, 1612, 1831, 10.2, 0, 0, 0 ) car2 = createVehicle ( 451, 1618, 1831, 10.2, 0, 0, 0 ) car3 = createVehicle ( 451, 1625, 1831, 10.2, 0, 0, 0 ) i wonna set those cars to red color .. i know setVehicleColor( car1, 255, 0, 0 ) setVehicleColor( car2, 255, 0, 0 ) setVehicleColor( car1, 255, 0, 0 ) there is any other trick to do that ?? i mean setVehicleColor( [car1 and car2 and car3],255,0,0) ???? #Just a question because i'm creating about 140 Red Car Or useing table ?? ( I don't know how )
-
yea i fixed that the same problem :\
-
Hello Everyone i need some help here i'm trying to create an idea that maybe help me in my script .. --server side-- function Bot1 () exports [ "slothBot" ]:spawnBot ( x, y, z, rotation, skin1, intr, dims, team, wep, "hunting", true ) triggerClientEvent( root,"onBotSpawn1",root) outputChatBox ("Bot Spawned",getRootElement(), 255, 255, 255, true ) end --client side-- addEvent("onBotSpawn1",true) addEventHandler("onBotSpawn1",root, function () playSound(root,"BotSpawn.ogg",root) end ) --XML file -- <meta> <info author="|TN|~>Legend" description="BotScript" type="script" version="1.0.0" /> <script src="Server.lua" type="server" /> <script src="Client.lua" type="client" /> <file src="BotSpawn.ogg"/> <include resource="slothbot" /> </meta> The Problem That the sound dont start and i need it to start to everyone ! ! Thx
-
function policeJob ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) local id = getElementModel ( attacker ) theWL = getPlayerWantedLevel ( source ) if (attackerweapon == 3 ) and (loss > 2 ) and (theWL > 0 and theWL < 6) then if getTeamName( theTeam ) == "Police" then if id == 280 or id == 281 or id == 282 or id == 283 then setPedArmor ( source, 25 ) setElementPosition (source, 265.8837890625, 77.138664245605, 1001, true) setElementInterior (source, 6) setElementDimension (source, 2) setTimer ( fadeCamera, (1000*59), 1, source, false) setTimer ( toggleControl, (1000*11), 1, source, 'fire', false) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox ( ""..theName.. " #FF0000Was Jailed For #00FF001 Min. #FF0000by the #0000FFPolice "..theCop.. " #FF0000[Reason]~>#00FF00D.M", root,255,255,255,true ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, 1500) setTimer ( setElementPosition, (1000*60), 1, source, 1544.4332275391, -1674.7698974609, 13.688399200439) setTimer ( setElementInterior, (1000*60), 1, source, 0) setTimer ( setElementDimension, (1000*60), 1, source, 0) setTimer ( outputChatBox, (1000*60), 1, ""..theName.. " #00FF00Finished his Jail Sentence; Is Released !", root,255,255,255,true ) setTimer ( fadeCamera, (1000*60), 1, source, true) setTimer ( toggleControl, (1000*60), 1, source, 'fire', true) setPedAnimation (source,false) setPlayerWantedLevel (source, 0) end end end end end addEventHandler ("onPlayerDamage", getRootElement(), policeJob) I Asking if there is a solution to put time for Criminal ! 60Sec ... Not In Chat ! Thanks And If Player Quit Save time and Resume When He Join Again Well Timer as begin is good
-
People in same countries had same Serial ? Well I Will Change it THANKS
-
Thanks ! But :\ [2017-01-08 20:51:37] WARNING: Skills\jetpack.lua:99: Bad argument @ 'getPlayerSerial' [Expected player at argument 1, got nil] [2017-01-08 20:51:37] WARNING: Skills\jetpack.lua:104: Bad argument @ 'getPlayerSerial' [Expected player at argument 1, got nil] [2017-01-08 20:51:43] WARNING: Skills\jetpack.lua:99: Bad argument @ 'getPlayerSerial' [Expected player at argument 1, got nil] [2017-01-08 20:51:43] WARNING: Skills\jetpack.lua:101: Bad argument @ 'getTimerDetails' [Expected lua-timer at argument 1, got nil] [2017-01-08 20:51:43] ERROR: Skills\jetpack.lua:101: attempt to perform arithmetic on a boolean value @Best-Killer
-
Hello Every One function Armor(thePlayer, commandName) setPedArmor ( thePlayer, 30 ) end addCommandHandler("armor", Armor) i Was Asking If There is A Solution To Make Player Use that Comman "armor" after 3 min When He Used He Can't Use it again only after 3min Sorry For My Bad English
-
addCommandHandler ( "jp", function ( thePlayer ) if doesPedHaveJetPack ( thePlayer ) then -- If the player have a jetpack already, remove it removePedJetPack ( thePlayer ) -- Remove the jetpack return -- And stop the function here end -- Otherwise, give him one if he has access local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) -- get his account name if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then -- Does he have access to Admin functions? if not doesPedHaveJetPack ( thePlayer ) then -- If the player doesn't have a jetpack give it. givePedJetPack ( thePlayer ) -- Give the jetpack end end end ) How Can I Add bindKey ?? Keep the command & and bindKey "j" ?? Thanks Quote