lockdw

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

0 Neutral

About lockdw

  • Rank
    Civilian

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. lockdw

    Handling for RP?

    I already solved it, thank you guys. CLOSED
  2. lockdw

    Handling for RP?

    Thank you man, removed many doubts! I will try something like this. When i create a car, i have to restart the handling. My question is: I have some markers around the map, and these markers are used to spawn different vehicles. I want all the markers to restart the handling resource when the player create the vehicle. Like a OnMarkerHit. How could i trigger a event like that ?
  3. lockdw

    Handling for RP?

    Bro, i found a handling script similar to this. But everytime i exit the car i have to restart the mod on "resources". The script disable himself. You know why? Debugscript 3 is clear.
  4. I'm using this handling script. https://www.mediafire.com/file/egm8t4e3rfprugn/scr_handling.rar/file But everytime i exit the car i have to restart the resource. Like, it is disabling himself How can i solve it?
  5. Hey, you guys have some handling for police cars that is not too ridiculous? I have a RP server and i want all the police cars to be faster then the default, but not too much. In case yes how could i modify this on the resources? Someone can help me ? note: idk if this is the right forum.
  6. lockdw

    FUEL SYSTEM

    It doesn't work... Where should i paste this ? What about this message ? https://prnt.sc/rg4d33
  7. lockdw

    FUEL SYSTEM

    Guys, how can i exclude some vehicles from the fuel script? Like, exclude the job's cars from the fuel system ? http://www.mediafire.com/file/gxw58nfvpawx72a/ir-gasolina.zip/file Here's the script link.
  8. Sup! I have this function in my server. But i want that only players who is in "gang" ACL could use it. How can i do this? Like, if you're not in the "gang" ACL, you can't even start the function. The pannel will not appears to you. function IniciarVendaArmas (source, Arma_Selecionada, getID, getPreco, getMunicao, WeaponID) local Jogador = getPlayerID(getID) local Preco = tonumber(getPreco) local Municao = tonumber(getMunicao) local MunicaoAtual = getElementData(source, "TS:MuniAtual") or 0 IniciarVendaArmas = StartWeaponSelling Jogador = player Preco = price Municao = ammo MunicaoAtual = current ammo
  9. Answering you question: Actually he don't unlock the car, but the player who locks it can enter normally. And thank you so much Martin. You're the guy!
  10. Hello there! Guys, i have a vehicle pannel where you can lock any car. But some players are locking job cars, how can i solve it? Maybe with a function that prevents the lock function by the vehicle ID. Could you guys help me? Thx. function lockvehicle(source) local Vehicle= getPedOccupiedVehicle(source) if not Vehicle then outputChatBox("#0040ff✘#ffffffBVM#0040ff✘➺ #ffffffVocê não está em nenhum vehicle!",source,255,0,0,true) return end local Seat = getPedOccupiedVehicleSeat(source) local PlayerID = getElementData(source, "ID") if not PlayerID then return end if Seat == 0 then if not getElementData(Vehicle, "TS:Locked") == true then setElementData(Vehicle, "TS:Locked", true) setElementData(Vehicle, "TS:VehicleOwner", PlayerID) outputChatBox("#0040ff✘#ffffffBVM#0040ff✘➺ #ffffffVehicle Locked!",source,255,0,0,true) else setElementData(Vehicle, "TS:Locked", false) setElementData(Vehicle, "TS:VehicleOwner", false) outputChatBox("#0040ff✘#ffffffBVM#0040ff✘➺ #ffffffVehicle Unlocked!",source,255,0,0,true) end else outputChatBox("#0040ff✘#ffffffBVM#0040ff✘➺ #ffffffYou are not the vehicle driver!",source,255,0,0,true) end end addEvent("TS:LockVehicle", true) addEventHandler("TS:LockVehicle", root, LockVehicle) function VehicleLocked(player) local PlayerID = getElementData(player, "ID") if getElementData(source, "TS:Locked") == true then if getElementData(source, "TS:VehicleOwner") == PlayerID then return end outputChatBox("#0040ff✘#ffffffBVM#0040ff✘➺ #ffffffThe Vehicle is Locked!",player,255,0,0,true) cancelEvent() end end addEventHandler("onVehicleStartEnter", root, VehicleLocked)
  11. Guys, when the player's stamina runs out, the tired anim happens. But when the player press "spacebar" again the anim stops and he can run even without stamina. How can i solve it? local currentStamina = 100 displayStamina = 0 FPS = 0 local isJumped = false local controlsState = true local increaseValue = 0.0045 local decreaseValue = 0.00425 local adminDuty = false local drugStaminaOff = false local playerGlueState = false addEventHandler("onClientResourceStart", resourceRoot, function() adminDuty = getElementData(localPlayer, "adminduty") or false drugStaminaOff = getElementData(localPlayer, "drugStaminaOff") or false playerGlueState = getElementData(localPlayer, "playerGlueState") or false end) addEventHandler("onClientElementDataChange", getRootElement(), function(dataName, oldValue, newValue) if dataName == "adminduty" and newValue then adminDuty = newValue end if dataName == "drugStaminaOff" then drugStaminaOff = newValue end if dataName == "playerGlueState" then playerGlueState = newValue end end) setTimer(function() FPS = math.floor(currentFPS or 0) end, 1000, 0) addEventHandler("onClientPreRender", getRootElement(), function(timeSlice) currentFPS = (1 / timeSlice) * 1000 if not adminDuty then local playerVelX, playerVelY, playerVelZ = getElementVelocity(localPlayer) local actualSpeed = (playerVelX * playerVelX + playerVelY * playerVelY) ^ 0.5 if playerVelZ >= 0.1 and not isJumped and not occupiedVehicle and not drugStaminaOff and not playerGlueState then isJumped = true currentStamina = currentStamina - 6.5 if currentStamina <= 0 then currentStamina = 0 if controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer,true) controlsState = false end end end if playerVelZ < 0.05 then isJumped = false end displayStamina = currentStamina if actualSpeed < 0.05 and not isJumped then if currentStamina <= 100 then if currentStamina > 25 then if not controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer, false) controlsState = true end currentStamina = currentStamina + increaseValue * timeSlice else currentStamina = currentStamina + increaseValue * timeSlice * 0.75 end else currentStamina = 100 end elseif actualSpeed >= 0.1 and not occupiedVehicle and not drugStaminaOff and not playerGlueState then if currentStamina >= 0 then currentStamina = currentStamina - decreaseValue * timeSlice else currentStamina = 0 if controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer,true) controlsState = false end end end setPedControlState("walk", true) displayStamina = currentStamina*getNode(4, "width")/100 end end)
  12. lockdw

    Help with STAMINA

    Guys, i'm a retard. I was editing it on the Downloads folder. I already solved it. THANK YOU ahahahaha
  13. Sup guys, i want the stamina to decrease more slower. What line should i change? local currentStamina = 100 displayStamina = 0 FPS = 0 local isJumped = false local controlsState = true local increaseValue = 0.0075 local decreaseValue = 0.00675 local adminDuty = false local drugStaminaOff = false local playerGlueState = false addEventHandler("onClientResourceStart", resourceRoot, function() adminDuty = getElementData(localPlayer, "adminduty") or false drugStaminaOff = getElementData(localPlayer, "drugStaminaOff") or false playerGlueState = getElementData(localPlayer, "playerGlueState") or false end) addEventHandler("onClientElementDataChange", getRootElement(), function(dataName, oldValue, newValue) if dataName == "adminduty" and newValue then adminDuty = newValue end if dataName == "drugStaminaOff" then drugStaminaOff = newValue end if dataName == "playerGlueState" then playerGlueState = newValue end end) setTimer(function() FPS = math.floor(currentFPS or 0) end, 1000, 0) addEventHandler("onClientPreRender", getRootElement(), function(timeSlice) currentFPS = (1 / timeSlice) * 1000 if not adminDuty then local playerVelX, playerVelY, playerVelZ = getElementVelocity(localPlayer) local actualSpeed = (playerVelX * playerVelX + playerVelY * playerVelY) ^ 0.5 if playerVelZ >= 0.1 and not isJumped and not occupiedVehicle and not drugStaminaOff and not playerGlueState then isJumped = true currentStamina = currentStamina - 6.5 if currentStamina <= 0 then currentStamina = 0 if controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer,true) controlsState = false end end end if playerVelZ < 0.05 then isJumped = false end displayStamina = currentStamina if actualSpeed < 0.05 and not isJumped then if currentStamina <= 100 then if currentStamina > 25 then if not controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer, false) controlsState = true end currentStamina = currentStamina + increaseValue * timeSlice else currentStamina = currentStamina + increaseValue * timeSlice * 0.75 end else currentStamina = 100 end elseif actualSpeed >= 0.1 and not occupiedVehicle and not drugStaminaOff and not playerGlueState then if currentStamina >= 0 then currentStamina = currentStamina - decreaseValue * timeSlice * else currentStamina = 0 if controlsState then triggerServerEvent("tiredAnimOn", localPlayer, localPlayer,true) controlsState = false end end end setPedControlState("walk", true) displayStamina = currentStamina*getNode(4, "width")/100 end end)
  14. Thanks!!! Helped a lot bro! Solved!