Jump to content

-Doc-

Members
  • Posts

    300
  • Joined

  • Last visited

Everything posted by -Doc-

  1. -Doc-

    Texture problem

    Hello? or another script with same logic but it doesn't work https://forum.multitheftauto.com/viewtopic.php?f=91&t=51660&p=503880&hilit=texture+hydra&sid=daf201d84ae2b9217d6d190d13711fef#p503880
  2. Hi i got this script from community and added team name in tables, so who has the team will be able to put the texture but i want to make to replace automatically by getting team name texture not by command. Client Another client Server
  3. I suggest you to take a look at dayz login panel it has what you want
  4. -Doc-

    SOLVED

    F#ck, thanks.
  5. -Doc-

    SOLVED

    I can't understand why it wont change color only white. dxDrawText("#FFFFFF"..weapons, sWidth*(1134.8/1280), sHeight*(60/720), sWidth*(0/1280), sHeight*(715/720), tocolor(2, 243, 0, 255), (0.9/1280)*sWidth,(0.7/720)*sHeight,"bankgothic", "left", "top", false, false, true, true, false)
  6. -Doc-

    setElementData

    I've broken the scritpt.
  7. -Doc-

    setElementData

    If text exists then setElementData(source,"lool",true) if text doesnt exist then setElementData(source,"lool",false)
  8. -Doc-

    setElementData

    Hi i got a problem how to setElementData if text exist. addEvent("onChatbubblesMessageIncome", true) local textsToDraw = {} local hideown local showtime local characteraddition local maxbubbles local showthebubbles = true function income(message,messagetype) if source ~= getLocalPlayer() or not hideown then if messagetype == 2 then if getPlayerTeam(source) == getPlayerTeam(getLocalPlayer()) then addText(source,message,messagetype) end else addText(source,message,messagetype) end end end function addText(source,message,messagetype) local notfirst = false for i,v in ipairs(textsToDraw) do if v[1] == source then v[4] = v[4] + 1 notfirst = true end end local infotable = {source,message,messagetype,0} table.insert(textsToDraw,infotable) if not notfirst then setTimer(removeText,showtime + (#message * characteraddition),1,infotable) end end function removeText(infotable) for i,v in ipairs(textsToDraw) do if v[1] == infotable[1] and v[2] == infotable[2] then for i2,v2 in ipairs(textsToDraw) do if v2[1] == v[1] and v[4] - v2[4] == 1 then setTimer(removeText,showtime + (#v2[2] * characteraddition),1,v2) end end table.remove(textsToDraw,i) break end end end function getTextsToRemove() for i,v in ipairs(textsToDraw) do if v[1] == source then removeText(v) end end end function handleDisplay() if getElementData(getLocalPlayer(), "state.hud") == "disabled" then return end if showthebubbles then for i,v in ipairs(textsToDraw) do if isElement(v[1]) then local camPosXl, camPosYl, camPosZl = getPedBonePosition (v[1], 6) local camPosXr, camPosYr, camPosZr = getPedBonePosition (v[1], 7) local x,y,z = (camPosXl + camPosXr) / 2, (camPosYl + camPosYr) / 2, (camPosZl + camPosZr) / 2 --local posx,posy = getScreenFromWorldPosition(x,y,z+0.25) local cx,cy,cz = getCameraMatrix() local px,py,pz = getElementPosition(v[1]) local distance = getDistanceBetweenPoints3D(cx,cy,cz,px,py,pz) local posx,posy = getScreenFromWorldPosition(x,y,z+0.020*distance+0.10) local elementtoignore1 = getPedOccupiedVehicle(getLocalPlayer()) or getLocalPlayer() local elementtoignore2 = getPedOccupiedVehicle(v[1]) or v[1] if posx and distance <= 45 and ( isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,elementtoignore1) or isLineOfSightClear(cx,cy,cz,px,py,pz,true,true,false,true,false,true,true,elementtoignore2) ) and ( not maxbubbles or v[4] < maxbubbles ) then -- change this when multiple ignored elements can be specified local width = dxGetTextWidth(v[2],1,"default") dxDrawRectangle(posx - (3 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 5,19,tocolor(0,0,0,255)) dxDrawRectangle(posx - (6 + (0.5 * width)),posy - (2 + (v[4] * 20)),width + 11,19,tocolor(0,0,0,40)) dxDrawRectangle(posx - (8 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 15,17,tocolor(0,0,0,255)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (1 + (v[4] * 20)),width + 19,17,tocolor(0,0,0,40)) dxDrawRectangle(posx - (10 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 19,13,tocolor(0,0,0,255)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 1,width + 23,13,tocolor(0,0,0,40)) dxDrawRectangle(posx - (12 + (0.5 * width)),posy - (v[4] * 20) + 4,width + 23,7,tocolor(0,0,0,255)) local r,g,b = 255,255,255 if v[3] == 2 then r,g,b = getTeamColor(getPlayerTeam(v[1])) end dxDrawText(v[2],posx - (0.5 * width),posy - (v[4] * 20),posx - (0.5 * width),posy - (v[4] * 20),tocolor(r,g,b,255),1,"default","left","top",false,false,false) end end end end end function getServerSettings() triggerServerEvent("onAskForBubbleSettings",getLocalPlayer()) end function saveSettings(settings) showtime = settings[1] characteraddition = settings[2] maxbubbles = settings[3] hideown = settings[4] addEvent("onChatbubblesMessageIncome",true) addEventHandler("onChatbubblesMessageIncome",getRootElement(),income) end addEventHandler("onClientPlayerQuit",getRootElement(),getTextsToRemove) addEventHandler("onClientRender",getRootElement(),handleDisplay) addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),getServerSettings) addEvent("onBubbleSettingsReturn",true) addEventHandler("onBubbleSettingsReturn",getRootElement(),saveSettings)
  9. You know sound fade effect? I wanna make that
  10. How to make sound to stop by fade effect?
  11. A;ready made it in another way thx for help
  12. Server side addEvent ( "receiveActiveState", true ); addEventHandler ( "receiveActiveState", root, function ( thePlayer, state ) outputChatBox ( getPlayerName ( thePlayer ) .." his console is ".. ( state and "not" or "" ) .. " active.", source ); end ); setTimer(check,50,0) function check ( thePlayer, _, playername ) if ( playername ) then local player = getPlayerFromName ( playername ); if ( player ) then triggerClientEvent ( "isPlayerConsoleActive", thePlayer, player, "receiveActiveState" ); else outputChatBox ( "player not found.", thePlayer ); end end end
  13. Not working i just want to output in chat if is player typing and thats all.
  14. Hey, i have one question how to define 'player' in these function?
  15. Press 'E' and the crosshair colour will turn in red and then try again.
  16. It's ipairs local ranks = { ["Fireman"] = { {"Level1", 1}, {"Level2", 2}, {"Level3", 3}, {"Level4", 4} } } function rankSet() for _, v in ipairs (ranks) do --code what you want end end
  17. If you want to edit something which you wrote yourself, why would you have to ask the community for help? Or.. didn't you write it yourself? If so, only the creator of the resource will most likely give you a hand.. if you didn't jack his scripts. The entire community won't help you if these scripts are stolen/leaked. And if you 'made' the base of script why you cant add a simple timer?
  18. Nop, -Paradox- made it, spider stealed it and you got it. To forum memebers, please check grafuroam for his 'made' script. I'm sick of this shit
  19. No one will help you make stolen scripts and ideas. EDIT: Stop pm'ing me that i stole your staff panel idea,this isn't actually your's and you dont even made a shit in your server and saying "I've made everything" but this 'everything' were made by forum members.
×
×
  • Create New...