Jump to content

DarkByte

Members
  • Posts

    207
  • Joined

  • Last visited

Everything posted by DarkByte

  1. Cody - Your script doesn't work Et-Wind the image remains black.
  2. The blip it's still black...
  3. I'm not setting data on vehicle, i'm setting the data on player.
  4. I want to toggle the control false if the data is true but it wont work... g_ArmedVehicles = { [425] = true, [447] = true, [520] = true, [430] = false, [464] = false, [432] = true } function checkNoDMGreen () if g_ArmedVehicles[getPedOccupiedVehicle(source)] and getElementData(source,"invincible",true) or getElementData(source,"green", true) then toggleControl(player, 'vehicle_fire', false) toggleControl(player, 'vehicle_secondary_fire', false) end end setTimer(checkNoDMGreen,100,0)
  5. One more thing, the text length goes straight but i want to go in rows, here's an example. How i want to draw it..
  6. Fixed it, thanks for help
  7. local timerfrom, timerto = 5,30 --Time in minutes function setRandomTimer ( ) startTimer = setTimer( function ( ) end , math.random ( timerfrom, timerto ) * 60 * 1000 , 1 ) end addEventHandler ("onResourceStart", resourceRoot, function ( ) setRandomTimer ( ) end )
  8. It disappears instantly but everything works...
  9. It's the same, suddenly disappers
  10. I've made a script for events, it works but the text suddenly disappears. Here is the code. Client Server
  11. Oh gosh, you saved me THANKS
  12. Hello, i have a problem. The zone name won't draw, if i put the code in main hud it screws up. ------------>> local screenW, screenH = guiGetScreenSize ( ) function renderNewLocation() -- if (not isPlayerHudComponentVisible("radar") or isPlayerMapVisible() or not hudEnabled) then return end local x,y,z = getElementPosition(localPlayer) local zone = getZoneName(x, y, z) if (zone == "El Castillo del Diablo") then zone = "Ghost Town" end if (cur_zone == zone) then return end cur_zone = zone dxDrawShadowText(zone, screenW*(280/1980), 30, screenW*(280/1980), 30, tocolor(254, 254, 254, 255), scale,"bankgothic", "center", "top", false, false, true, true, false) outputChatBox(zone) end addEventHandler("onClientRender",root,renderNewLocation)
  13. PLAYERS = ? Are you blind? there is thePlayer
  14. function blip () for id, thePlayer in ipairs(getElementsByType("player")) do local r, g, b = getTeamColor(getPlayerTeam(PLAYERS)) createBlipAttachedTo(thePlayer, 0, 2, r, g, b) end end addEventHandler("onPlayerJoin",root,blip) function quit () destroyBlipsAttachedTo(source) end addEventHandler("onPlayerQuit", getRootElement(), quit) function destroyBlipsAttachedTo(player) local attached = getAttachedElements(player) if (attached) then for k,element in ipairs(attached) do if getElementType(element) == "blip" then destroyElement(element) end end end end
  15. DarkByte

    .

    The bar grows only up when i'm restarting the resource, after that it's like ordinary dxDrawRectangle but i want it to decrease and increase by the value given.
×
×
  • Create New...