-
Posts
1,056 -
Joined
-
Last visited
Everything posted by Sasu
-
playerSource no esta definido y ademas no cerraste el evento. Ademas setPlayerSkin y getPlayerSkin no se podra utilizar en las futuras versiones. Si lo pones, el server dira que se nesecitara actualizar esa funcion a setElementModel/getElementModel. addEventHandler ("onMarkerHit", getRootElement(), function(player) if getElementType(player) == "player" then if (getElementModel(player) == 23) then outputChatBox("Has pasado la prueba", player) else setElementModel(player, 23) end end end ) Esto haria que si tienes el skin 23 te dira "Has pasado la prubea" y si no lo tiene le pondra el skin 23.
-
Good program but You can use Control+V to paste text. Anyway Good job!
-
createVehicle tiene, luego de los argumentos de las coordenadas, argumentos de rotacion. createVehicle(410, -2506.69, 2347.30, 4.69, rx, ry, rz) -- rx, ry, rz son las coordenadas de rotacion.
-
It's a normal gui progress bar. It's green because I use Sath metro them ( viewtopic.php?f=139&t=54023 ) . But I you like it I will make with this theme with dx. Thank you very much.
-
With this script you can see your velocity when you are in a vehicle. Its a simple script but useful. Some pictures: If you want ( only if you want ), give me stars. Thank you very much. Have fun! Resource's link: https://community.multitheftauto.com/index.php?p= ... ls&id=7157
-
There's no way, I think.
-
Oh stupid error . Thank you very much.
-
function mostrar() if isPedInVehicle(getLocalPlayer()) then local vehicle = getPedOccupiedVehicle(getLocalPlayer()) local velocity = getVelocityPerKilometre( vehicle ) local maxVelocity = getVehicleHandling(Vehicle)["maxVelocity"] local count = 100/maxVelocity local finalProgress = count*velocity guiSetText(velocity, "KM/H: "..velocity) guiProgressBarSetProgress(barra, tonumber(finalProgress)) end end addEventHandler("onClientRender", root, mostrar) Error on debug: At line 5: Bad argument @ 'getVehicleHandling' At line 5: attempt to index a boolean value
-
Podes cargar todo lo que tu quieras con una base de datos, hasta lo que yo conosco. Creas tres columnas y los guardas ahi. Si hay otra manera, que alguien me corrija.
-
No es necesario hacerlo en client-side. Puede hacerlo todo en server-side. addEventHandler("onPlayerDamage", root, function (atacante) if getElementType ( atacante ) == "ped" and getElementData(atacante,"bot") == "si" then killPed(source) end end )
-
function rainbowColor () for id,player in ipairs(getElementsByType("player")) do local vehicle = getPedOccupiedVehicle(player) if vehicle then if getElementDimension(vehicle) == 0 then setVehicleColor(vehicle, math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255), math.random(0,255) ) end end end end function discoheadlights (btn) for id,player in ipairs(getElementsByType("player")) do local car = getPedOccupiedVehicle(player) if car and isElement(car) then local l1 = getVehicleLightState(car,0) if l1 == 0 then setVehicleHeadLightColor(car,math.random(0,255),math.random(0,255),math.random(0,255)) setVehicleLightState(car,0,1) setVehicleLightState(car,2,1) setVehicleLightState(car,1,0) setVehicleLightState(car,3,0) else setVehicleHeadLightColor(car,math.random(0,255),math.random(0,255),math.random(0,255)) setVehicleLightState(car,0,0) setVehicleLightState(car,2,0) setVehicleLightState(car,1,1) setVehicleLightState(car,3,1) end end end end isRainbowColor = false isLightRainbowColor = false addEventHandler("onClientGUIClick", root, function() if ( source == rainbowColor ) then if isRainbowColor then if isTimer(RainbowTimer) then killTimer(RainbowTimer) end isRanbowColor = false else RainbowTimer = setTimer(rainbowColor,1000,0) isRanbowColor = true end elseif ( source == disco ) then if isLightRainbowColor then if isTimer(LightTimer) then killTimer(LightTimer) end isLightRainbowColor = false else LightTimer = setTimer(discoheadlights,1000,0) isLightRainbowColor = true end end end )
-
For what? I confused. Sorry. I saw a getPlayerIP instead getPlayerPing. Sorry
-
You must put the resource in ACL Group "Admin".
-
Try this: guiCreateLabel(0.50, 0.10, 0.30, 0.09, "Prince:$500000", true, Tab[7]) disco = guiCreateButton (0.50, 0.15, 0.40, 0.09, "DISCO LIGHTS", true, Tab[7]) guiCreateLabel(0.50, 0.25, 0.30, 0.09, "Prince:$500000", true, Tab[7]) rainbowColor = guiCreateButton (0.50, 0.30, 0.40, 0.09, "DISCO CAR", true, Tab[7]) r,g,b = 255,255,255 upValues = true function rainbowColor (btn) if upValues == true then if g <= 255 and g >= 0 and r == 0 and b == 255 then r,g,b = r,g-6.375,b end if r <= 255 and r >= 0 and g == 255 and b == 255 then r,g,b = r-6.375,g,b end if b <= 255 and b >= 0 and r == 0 and g == 0 then r,g,b = r,g,b-6.375 end if r == 0 and g == 0 and b == 0 then upValues = false end end if upValues == false then if g <= 255 and g >= 0 and r == 255 and b == 0 then r,g,b = r,g+6.375,b end if r <= 255 and r >= 0 and g == 0 and b == 0 then r,g,b = r+6.375,g,b end if b <= 255 and b >= 0 and r == 255 and g == 255 then r,g,b = r,g,b+6.375 end if r == 255 and g == 255 and b == 255 then upValues = true end end for id,player in ipairs(getElementsByType("player")) do local vehicle = getPedOccupiedVehicle(player) if vehicle then if getElementDimension(vehicle) == 0 then setVehicleColor(vehicle,r,g,b,r,g,b) end end end end function discoheadlights (btn) for id,player in ipairs(getElementsByType("player")) do local car = getPedOccupiedVehicle(player) if car and isElement(car) then local l1 = getVehicleLightState(car,0) if l1 == 0 then setVehicleHeadLightColor(car,math.random(0,255),math.random(0,255),math.random(0,255)) setVehicleLightState(car,0,1) setVehicleLightState(car,2,1) setVehicleLightState(car,1,0) setVehicleLightState(car,3,0) else setVehicleHeadLightColor(car,math.random(0,255),math.random(0,255),math.random(0,255)) setVehicleLightState(car,0,0) setVehicleLightState(car,2,0) setVehicleLightState(car,1,1) setVehicleLightState(car,3,1) end end end end isRainbowColor = false isLightRainbowColor = false addEventHandler("onClientGUIClick", root, function() if ( source == rainbowColor ) then if isRainbowColor then if isTimer(RainbowTimer) then killTimer(RainbowTimer) end isRanbowColor = false else RainbowTimer = setTimer(rainbowColor,50,0) isRanbowColor = true end elseif ( source == disco ) then if isLightRainbowColor then if isTimer(LightTimer) then killTimer(LightTimer) end isLightRainbowColor = false else LightTimer = setTimer(discoheadlights,1000,0) isLightRainbowColor = true end end end ) You can turn on and turn off.
-
I dont understand that You said.
-
Puede presionar en las palabras y te llevara a la wiki en donde hay ejemplos.
-
You forgot 'then' --Quit Button function quitButton ( playerSource, commandName ) if ( playerSource ) then executeCommandHandler ( "quit", playerSource ) end end addEvent( "quitButton", true ) addEventHandler( "quitButton", getRootElement(), quitButton )
-
function veh_img () if isPedInVehicle(localPlayer) then local vehiclePed = getPedOccupiedVehicle(localPlayer) local id = getElementModel(vehiclePed) if id == 551 then dxDrawImage ( screenWidth - 290, 500, 250, 50, "veh_names/".. tostring( id ) .. ".png") end end end addEventHandler("onClientRender", getRootElement(), veh_img)
-
Alguien me explica como es eso de crear eventos para luego poder usarlos en otro recursos? Como por ej.: onZombieWasted
-
--Client function cevent () if isElement(sound) then stopSound(sound) end sound = playSound("evcriado.mp3") setSoundVolume(sound, 0.5) end addEvent("onPlayerRequestSound", true) addEventHandler("onPlayerRequestSound", root, cevent) --Server function requestSound() triggerClientEvent("onPlayerRequestSound", root) end addCommandHandler("cevent", requestSound)
-
Deberia venir algun admin aca para que no se arme y asi cierre el post.
-
new Offers Limited| www.hdf-host.com |mta host only $3 SMS
Sasu replied to iPrestege's topic in Hosting solutions
Really $3 usd ._. It is very cheap. I dont know if real. The web page isnt beatiful. But if it is real good luck! -
Intenta usando el evento onClientRender.