Jump to content

FiGo

Members
  • Posts

    98
  • Joined

  • Last visited

Details

  • Location
    Alexandria

Recent Profile Visitors

967 profile views

FiGo's Achievements

Punk-@ss B*tch

Punk-@ss B*tch (12/54)

2

Reputation

  1. FiGo

    help me

    i want to make in the timer that when a specified car is hit it auto fix by 5 % health until it reaches the 100 %
  2. FiGo

    help me

    timer = {} function incHp(veh) timer[veh] = setTimer(setElementHealth(veh), 10, 10, veh, getElementHealth(veh)+5) end addEventHandler("onVehicleEnter", root, incHp) function stopincHP(veh) if(isTimer(timer[veh] ))then killTimer(timer[veh]) end end addEventHandler("onPlayerVehicleExit", root, stopincHP) what's wrong with that function
  3. FiGo

    help me

    ty bro for helping me it worked good if i want to add a weapon to my car what can i use
  4. FiGo

    help me

    nvm i fixed that error but still doesn't work
  5. FiGo

    help me

    [2021-04-13 15:42:41] ERROR: Loading script failed: CITvehicles\server.lua:26: 'then' expected near ')'
  6. FiGo

    help me

    function playerPressedKey(button, press) if (press) then -- Only output when they press it down --outputChatBox("You pressed the "..button.." key!") end end addEventHandler("onClientKey", root, playerPressedKey) addEventHandler( "onClientKey", root, function(button,press) if button == "1" then triggerServerEvent("sportmod", localPlayer) elseif button == "2" then triggerServerEvent("business", localPlayer) return true end return false end ) function setVehicleVelocity(player, command) local veh = getPedOccupiedVehicle(player) if (not veh or veh == nil or getPedOccupiedVehicleSeat(player) ~= 0 ) then return end if (command == "sportmod") then setVehicleHandling(veh, "maxVelocity", 320) setVehicleHandling(veh, "engineAcceleration", 20) setVehicleHandling(veh, "driveType", "awd") setVehicleHandling(veh, "handlingFlags", 0x1008000) outputChatBox("Sport Mod Enabled", player, 255, 255, 0, true) elseif (command == "business") then setVehicleHandling(veh, "maxVelocity", 180) setVehicleHandling(veh, "engineAcceleration", 20) setVehicleHandling(veh, "driveType", "awd") setVehicleHandling(veh, "handlingFlags", 0x1008000) outputChatBox("Business Mod Enabled", player, 255, 255, 0, true) end end addCommandHandler("sportmod", setVehicleVelocity) addCommandHandler("business", setVehicleVelocity) addEvent("sportmod", true) addEvent("business", true) addEventHandel("sportmod", root, setVehicleVelocity(sportmod)) addEventHandel("business", root, setVehicleVelocity(business)) server side
  7. FiGo

    help me

    but when i press 1 and 2 it doesn't work
  8. FiGo

    help me

    function playerPressedKey(button, press) if (press) then -- Only output when they press it down --outputChatBox("You pressed the "..button.." key!") end end addEventHandler("onClientKey", root, playerPressedKey) addEventHandler( "onClientKey", root, function(button,press) if button == "1" then triggerServerEvent("sportmod", localPlayer) elseif button == "2" then triggerServerEvent("business", localPlayer) return true end return false end ) it says [2021-04-13 14:31:03] ERROR: Client (FiGo) triggered serverside event sportmod, but event is not added serverside anyone please
  9. FiGo

    help me

    can't use please make it and thanks
  10. FiGo

    help me

    when i press 1 it auto changed to sport mod when i press 2 it changes to business
  11. FiGo

    help me

    okay last thing can't i make the addCommandHandler with numbers
  12. FiGo

    help me

    can't u type a function
  13. FiGo

    help me

    addCommandHandler("gethandling", function(thePlayer) local veh = getPedOccupiedVehicle(thePlayer) local handling = getVehicleHandling(veh) outputChatBox("maxVelocity is "..handling.maxVelocity, thePlayer, 255, 255, 255, true) end) -- Bullet -- (250km/h) function setVelocity(player, command) local veh = getPedOccuipedVehicle(player) if (not veh or veh == nil or getPedOccuipedVehicleSeat(player) ~= 0 ) then return end if (command=="1") then setVehicleHandling(veh, "maxVelocity", 230) outputChatBox("Sport Mod Enabled", veh, 255, 255, 0, true) elseif (command=="2") then setVehicleHandling(veh, "maxVelocity", 180) outputChatBox("Business Mod Enabled", veh, 255, 255, 0, true) end end addCommandHandler("1", setVelocity) addCommandHandler("2", setVelocity)
  14. FiGo

    help me

    okay i checked the max velocity and its 230 and what is next
×
×
  • Create New...