Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. Thing is, you are creating the images again instead of loading a new image in the currently created ones.
  2. Use guiStaticImageLoadImage
  3. Is the function "toggleEditor" exported from the handling editor?
  4. local gate = createObject(2893, -2055.69, 169.19, 27.89, 343, 0, 90) local gateState = false -- Define a variable with the state of the gate function isAclGroup ( p, group ) if ( p and getElementType ( p ) == "player" and type ( group ) == "string" ) then return isObjectInACLGroup ( "user.".. getAccountName ( getPlayerAccount ( p ) ), aclGetGroup ( group ) ) else return false end end function moveGate ( psource ) if isAclGroup ( psource, "SamCarTow" ) then gateState = ( not gateState ) -- Set the state of the gate to the opposite of the current if ( gateState ) then -- If the state is 'true' moveObject ( gate, 4000, -2055.69, 169.19, 29.89 ) -- Open the gate else -- If the state is 'false' moveObject ( gate, 4000, -2055.69, 169.19, 27.89 ) -- Close the gate end end end addCommandHandler ( "lift", movegate )
  5. Castillo

    Server Time

    Either: setMinuteDuration or this: setTimer + setTime
  6. It's because the scripts were compiled with a external compiler, rather than using the MTA compiler.
  7. I doubt that's required, as you can see in his last video, there is the chat visible.
  8. Hello there. So, in my server, we've been having this weird bug, which is that some times ( randomly ), players are unable to harm others, the cause seems to be that in the remote player screen, the attacker has no weapon, just hitting with fist. My question is: any else had this problem or encountered it on another server? is there a way to fix it? Thanks for reading.
  9. Castillo

    Command

    El drive by tiene comandos con espacios, pero, alguna vez intentaste utilizarlos? si no me equivoco, los usa para los binds. P.D: Te borre el comentario porque era agresivo y provocativo.
  10. Castillo

    Command

    Alex tiene razon, no se pueden utilizar espacios en los nombres de los comandos. Ya que despues de que pongas un espacio, se toma como argumento.
  11. No, MTA has no support for new models.
  12. https://community.multitheftauto.com/in ... ils&id=344 Podes utilizar este recurso como ejemplo, lo que hace es poner los nombres de cada jugador en el mapa.
  13. local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local maxfuel = getElementData(veh, "maxfuel") or 0 local fuel = getElementData(getElementData(veh, "parent"), "fuel") or 0 local needengine = getElementData(veh, "needengines") local needtires = getElementData(veh, "needtires") local needparts = getElementData(veh, "needparts") local engine = getElementData(getElementData(veh, "parent"), "Engine_inVehicle") or 0 local tires = getElementData(getElementData(veh, "parent"), "Tire_inVehicle") or 0 local parts = getElementData(getElementData(veh, "parent"), "Parts_inVehicle") or 0 local offset = dxGetFontHeight(1.02, "default-bold") local w = dxGetTextWidth(tostring(engine) .. "/" .. tostring(needengine) .. " Engine", 1.02, "default-bold") if engine == needengine then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(engine) .. "/" .. tostring(needengine) .. " Engine", screenWidth * 0.5 - w / 2, screenHeight * 0, screenWidth * 0.5 - w / 2, screenHeight * 0, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tostring(tires) .. "/" .. tostring(needtires) .. " Tires", 1.02, "default-bold") if tires == needtires then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(tires) .. "/" .. tostring(needtires) .. " Tires", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth(tostring(parts) .. "/" .. tostring(needparts) .. " Tank Parts", 1.02, "default-bold") if parts == needparts then r, g, b = 0, 255, 0 else r, g, b = 255, 0, 0 end dxDrawText(tostring(parts).."/"..tostring(needparts).." Tank Parts", screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, screenWidth * 0.5 - w / 2, screenHeight * 0 + offset, tocolor(r, g, b, 220), 1.02, "default-bold") local w = dxGetTextWidth("Fuel:" .. math.floor(fuel) .. "/" .. maxfuel, 1.02, "default-bold") if fuel == maxfuel then r,g,b = 0,255,0 elseif fuel < maxfuel/10 then r,g,b = 255,0,0 elseif fuel < maxfuel/4 then r,g,b = 255,50,0 elseif fuel < maxfuel/3 then r,g,b = 200,100,0 elseif fuel < maxfuel/2 then r,g,b = 125,200,0 elseif fuel < maxfuel/1.5 then r,g,b = 50,200,0 end dxDrawText ("Fuel:"..math.floor(fuel).."/"..maxfuel,screenWidth*0.5-w/2 , screenHeight*0+offset*2,screenWidth*0.5-w/2 , screenHeight*0+offset*2,tocolor ( r,g,b, 220 ), 1.02, "default-bold" ) end
  14. I would recommend creating it all client side, would be far more efficient.
  15. La verdad que no te entiendo, porque no podes usar OOP para hacer lo que necesitas?
  16. Castillo

    [Solved]

    That's a decompiled piece of code, we won't help you with that.
  17. Con eso deberia funcionar incluso con un vehiculo.
  18. function Zonaa1 ( pHitElement ) if ( getElementType ( pHitElement ) == 'player' and pHitElement == localPlayer ) then setElementData ( pHitElement, "Zona", 1 ) end end addEventHandler ( 'onClientColShapeHit', Zona1, Zonaa1 )
  19. onPlayerJoin is a server-side only event. Use onClientResourceStart. Or simply remove this: guiSetVisible(window, false) showCursor(false)
  20. No offense, but $35 bucks for a radar script is quite a lot...
  21. Excellent job so far, it looks really awesome. Keep up the good work!
×
×
  • Create New...