-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
Thing is, you are creating the images again instead of loading a new image in the currently created ones.
-
Use guiStaticImageLoadImage
-
Is the function "toggleEditor" exported from the handling editor?
-
You're welcome.
-
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 )
-
Either: setMinuteDuration or this: setTimer + setTime
-
It's because the scripts were compiled with a external compiler, rather than using the MTA compiler.
-
I doubt that's required, as you can see in his last video, there is the chat visible.
-
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.
-
Any errors on debugscript?
-
No, MTA has no support for new models.
-
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.
-
You can't add new models.
-
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
-
I would recommend creating it all client side, would be far more efficient.
-
La verdad que no te entiendo, porque no podes usar OOP para hacer lo que necesitas?
-
That's a decompiled piece of code, we won't help you with that.
-
Con eso deberia funcionar incluso con un vehiculo.
-
function Zonaa1 ( pHitElement ) if ( getElementType ( pHitElement ) == 'player' and pHitElement == localPlayer ) then setElementData ( pHitElement, "Zona", 1 ) end end addEventHandler ( 'onClientColShapeHit', Zona1, Zonaa1 )
-
onPlayerJoin is a server-side only event. Use onClientResourceStart. Or simply remove this: guiSetVisible(window, false) showCursor(false)
-
No offense, but $35 bucks for a radar script is quite a lot...
-
Excellent job so far, it looks really awesome. Keep up the good work!