Jump to content

FuriouZ

Members
  • Posts

    459
  • Joined

  • Last visited

Everything posted by FuriouZ

  1. Hello all! I have question that how i can attach dxText to vehicle component Example(guieditor) If i move camera front of the car,then i get theese errors, otherwise debug doesn't show any errors, but text doesn't appear too addEventHandler("onClientRender",root, function() local vehicle = getPedOccupiedVehicle(localPlayer) local getComponent = getVehicleComponents(vehicle) if ( vehicle ) then for k in pairs (getComponent) do local vcpX, vcpY, vcpZ = getVehicleComponentPosition(vehicle, "bump_rear_dummy") local vcpSP,vcpSP = getScreenFromWorldPosition ( vcpX, vcpY, vcpZ ) if ( vcpSP and vcpSP ) then dxDrawLine(vcpSP,vcpSP,796, 547, 871, 472, tocolor(255, 255, 255, 255), 2, true) dxDrawLine(vcpSP,vcpSP,871, 472, 1010, 473, tocolor(255, 255, 255, 255), 2, true) dxDrawText(vcpSP,vcpSP,"Damage: 100%", 871, 449, 1010, 473, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, true, false, false) end end end end )
  2. And https://wiki.multitheftauto.com/wiki/SetElementFrozen
  3. Tested it out and it is very good ! Especially that it supports multi-language now
  4. Hello Someone have KWK Cargo plane resource? His download links are dead If someone still have it please give me a link This is what i mean https://forum.multitheftauto.com/viewtopic.php?f=93&t=22548
  5. FuriouZ

    Colour code

    If you have time, can you watch what's the problem there, i only need to remove colour codes from there this is the original resource https://community.multitheftauto.com/index.php?p= ... ils&id=586
  6. FuriouZ

    Colour code

    Spamms "ADDING: FuriouZ" to the chat box, but name is still dissappeard
  7. FuriouZ

    Colour code

    Still the same problem, name dissapears Debug doesn't show any errors
  8. FuriouZ

    Colour code

    I have problem with colour codes, how i can remove them ? i tryed this way table.insert(players,{getPlayerName(player):gsub("#%x%x%x%x%x%x",""),calculateDistance(headingForCp,distanceToCp),player}) but then it doesn't show name at all no errors in debug original local players = {} for k,player in ipairs(getElementsByType("player")) do if not getElementData(player,"race.finished") then local headingForCp = getElementData(player,"race.checkpoint") local distanceToCp = distanceFromPlayerToCheckpoint(player,headingForCp) if distanceToCp ~= false then table.insert(players,{getPlayerName(player),calculateDistance(headingForCp,distanceToCp),player}) end end end
  9. Hello! I have a question, how i can make that i have to hold key down for example 3 secons and then vehicle engine turns on ? so far i have this function toggleEngine() local checkPlayerVehicle = getPedOccupiedVehicle( localPlayer ) if ( checkPlayerVehicle and getVehicleController( checkPlayerVehicle ) == localPlayer ) then local checkState = getVehicleEngineState( checkPlayerVehicle ) setVehicleEngineState( checkPlayerVehicle, not checkState ) end end bindKey("I", "down",toggleEngine) Thanks !
  10. FuriouZ

    Question

    Because i am working on guiElements, i have never used dx functions. Thanks
  11. FuriouZ

    Question

    Hello Is possible to use this function on guiElement too or similar to this ? I mean image spinning local seconds = getTickCount() / 1000 local angle = math.sin(seconds) * 80 dxDrawImage ( screenWidth/2 - 50, 0, 100, 240, 'arrow.png', angle, 0, -120 )
  12. No. Because the player can switch between arenas. So put this code in a function and call it everytime the player choose/select an arena: function updateCanBeKnockedOffBike() local arena = getElementData(localPlayer, "Arena") if arena == "Stuntage" then setPedCanBeKnockedOffBike(localPlayer, false) else setPedCanBeKnockedOffBike(localPlayer, true) end end Has to be on the client side ofc. Thank you !
  13. Hello I have question What event should i use to check player data ? I think theese are wrong ? I mean, will they lag ? onClientRender onClientPreRender For example i got this function: -- addEventHandler("onClientRender", root, addEventHandler("onClientPreRender", root, function() local Arena = getElementData(player,"Arena"); if (Arena == "Stuntage" ) then setPedCanBeKnockedOffBike(localPlayer, false) else setPedCanBeKnockedOffBike(localPlayer, true) end end) I found another way setTimer But i thing it will lag, or not ? or: setTimer( function() local Arena = getElementData(player,"Arena"); if (Arena == "Stuntage" ) then setPedCanBeKnockedOffBike(localPlayer, false) else setPedCanBeKnockedOffBike(localPlayer, true) end end,5000,0) Wich one will be better ? Or should i use someting else ?
  14. FuriouZ

    Problem

    This is what i tought, yeah, now it works, but after else nothing doesn't work i mean resetSkyGradient() setPedCanBeKnockedOffBike(g_Me, true) setWeather(0) resetRainLevel() No any errors in debug
  15. FuriouZ

    Problem

    It's not that simple Okay, i added, but nothing changed, added one more, still nothing I don't know, debug says: line 9: 'end' expected (to close 'if' at line 5) near 'elseif' But i can't close there, because then function doesn't resetSkyGradient() or what ? addEvent("setArenaProperties",true) addEventHandler("setArenaProperties",root, function() local g_Me = getLocalPlayer() if ( getElementData(g_Me,"Arena" ) == "Freeroam" ) then setSkyGradient(60, 100, 196, 136, 170, 212) else resetSkyGradient() elseif ( getElementData(g_Me,"Arena" ) == "Stuntage" ) then setPedCanBeKnockedOffBike(g_Me, false) else setPedCanBeKnockedOffBike(g_Me, true) elseif ( getElementData(g_Me,"Arena" ) == "DayZ" ) then showPlayerHudComponent("crosshair",true) showPlayerHudComponent("radar",true) setWeather(8) setRainLevel(0) else setWeather(0) resetRainLevel() end end end end ) WhoAmI your's doesn't work either
  16. FuriouZ

    Problem

    Still the same error Full code: addEvent("setArenaProperties",true) addEventHandler("setArenaProperties",root, function() local g_Me = getLocalPlayer() if ( getElementData(g_Me,"Arena" ) == "Freeroam" ) then setSkyGradient(60, 100, 196, 136, 170, 212) else resetSkyGradient() elseif ( getElementData(g_Me,"Arena" ) == "Stuntage" ) then setPedCanBeKnockedOffBike(g_Me, false) else setPedCanBeKnockedOffBike(g_Me, true) elseif ( getElementData(g_Me,"Arena" ) == "DayZ" ) then showPlayerHudComponent("crosshair",true) showPlayerHudComponent("radar",true) setWeather(8) setRainLevel(0) else setWeather(0) resetRainLevel() end end end )
  17. FuriouZ

    Problem

    Heya! I can't understand how to fix it, tryed many ways, but then i got more errors Debug says line:8 'end' expected (to close 'if' at line 3) near 'elseif' client function() local g_Me = getLocalPlayer() if ( getElementData(g_Me,"Arena" ) == "Freeroam" ) then setSkyGradient(60, 100, 196, 136, 170, 212) else resetSkyGradient() elseif ( getElementData(g_Me,"Arena" ) == "Stuntage" ) then setPedCanBeKnockedOffBike(g_Me, false) else setPedCanBeKnockedOffBike(g_Me, true) elseif ( getElementData(g_Me,"Arena" ) == "DayZ" ) then showPlayerHudComponent("crosshair",true) showPlayerHudComponent("radar",true) setWeather(8) setRainLevel(0) else setWeather(0) resetRainLevel() end end end
  18. Hello, what is wind sound id ? showsound in development mode doesn't find it. Thanks
  19. FuriouZ

    DX HUD

    It looks very clear I suggest you to do the armour image too only one colour, then it would be better imo
  20. Still countPlayersInArena a nil value
×
×
  • Create New...