Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. function passwordHandler(thePlayer, newpassword) local account = getPlayerAccount(thePlayer) local nCuenta = getAccountName(account) if (account) then if (isGuestAccount(account)) then exports.SAEGMessages:sendClientMessage("[sERVER] Please log in to change the password.", source, 255, 255, 255, true) else setAccountPassword(account, newpassword) exports.SAEGMessages:sendClientMessage("[sERVER] The account password has been change.", source, 255, 255, 255, true) exports.SAEGMessages:sendClientMessage["[ACCOUNT][uSER:"..nCuenta.."] - [NEW PASSWORD:"..newpassword.."].", 255, 255, 255, true) end end end addEvent("Cambiar", true) addEventHandler("Cambiar", getRootElement(), passwordHandler)
  2. change that to "bases/swat.map"/> "bases/Military.map" />
  3. open the base.map and check
  4. idk if its works function getNearestVehicle(thePlayer) local x, y, z = getElementPosition(thePlayer) local plaDim = getElementDimension(thePlayer) local prevDistance local nearestVehicle for i , v in ipairs(getElementsByType("vehicle")) do local distance = getDistanceBetweenPoints3D(x, y, z, getElementPosition(v)) if plaDim == getElementDimension(v) then if distance <= (prevDistance or distance + 1) then prevDistance = distance nearestVehicle = v end end end return nearestVehicle or false end
  5. Dimos7

    Kill timer

    function setTimerOnWasted() timer = setTimer(function() guiSetVisible(deathWin, true) end, 30000, 0) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), setTimerOnWasted) killTimer(timer)
  6. Dimos7

    Kill timer

    try this: function setTimerOnWasted() timer = setTimer( function() guiSetVisible(deathWin, true) end ,30000,0) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), setTimerOnWasted) killTimer(timer)
  7. Dimos7

    Script start

    save the file .lua with a folder name it like you want and make a meta file for works
  8. try this pojazdlockmarker = null function unlock (player, key, state) local pojazd = getPedOccupiedVehicle(player) local islocked = isVehicleLocked(pojazd) local x, y, z = getElementPosition(pojazd) local lx = x+5 if (islocked == true ) then pojazdlockmarker = createMarker(lx, y, z, "cylinder", 1, 255, 0, 0, 0) end end function markerunlock() if getKeyState( "L" ) == true then setVehicleLocked(pojazd, false) outputChatBox ( "Otworzyłeś swój pojazd używając kluczyków!", player, 0, 255, 0 ) else outputChatBox ( "Ten pojazd nie należy do Ciebie!", player, 255, 0, 0 ) end end addEventHandler("onMarkerHit", pojazdlockmarker, markerunlock) addEventHandler("onVehicleStartExit", getRootElement(), unlock)
  9. addEventHandler("onClientPedWasted", getRootElement(), function() if isPedDead(source) == true then destroyElement(getPedOccupiedVehicle(source)) end end )
  10. idk if its works the marker make it visible and try to find where is close to door function toggleVehicleLock(thePlayer, key, state) if (getPedOccupiedVehicleSeat(thePlayer)== 0) then local veh = getPedOccupiedVehicle(thePlayer) if isVehicleLocked(veh) == false then setVehicleLocked(veh, true) else setVehicleLocked(veh, false) end local x, y, z = getElementPosition(veh) local marker = createMarker(x+5, y, z, "cylinder", 1, 255, 0, 0, 0) end end addEventHandler("onMarkerHit", getRootElement(), function() if isPedInVehicle(thePlayer) == false then if isVehicleLocked(veh, true) and state == "down" then setVehicleLocked(veh, false) end end end)
  11. function onQuit(quitType, reason, resposibleElement) if not isGuestAccount(getPlayerAccount(source)) then local account = getPlayerAccount(source) if account then local x, y, z = getElementPosition(source) setAccountData(account, "funmodev2-x", x) setAccountData(account, "funmodev2-y", y) setAccountData(account, "funmodev2-z", z) end end end addEventHandler("onPlayerQuit", getRootElement(), onQuit) function onLogin(thePreviousAccount, theCurrentAccount, autoLogin) if not isGuestAccount(getPlayerAccount(source)) then local playerX = getAccountData(theCurrentAccount, "funmodev2-x") local playerY = getAccountData(theCurrentAccount, "funmodev2-y") local playerZ = getAccountData(theCurrentAccount, "funmodev2-z") setElementPosition(source, playerX, playerY, playerZ) end end addEventHandler("onPlayerLogin", getRootElement(), onLogin)
  12. Dimos7

    Houses

    Then you need take the location from the marker in map editor all the houses and place them in the script
  13. createObject createWeapon getCameraMatrix getProjectileType getCameraRotation
  14. Dimos7

    Question

    I want do the vehicle i own despawn when i quit and spawn when i loggin
  15. there not type marker its cylinder, arrow, checkpoint, ring, corona marker = createMarker(488, -1743, 12, "cylinder", 1, 255, 0, 0, 255) setElementData(marker, "garageID", 12)
  16. Dimos7

    Question

    Its posible make a car not spawn when player is quit and spawn when player login?
  17. I mean you have save them like this setAccountData(account, "loginlocation.x", x) ? if not exist then no can find the x ,y, z so request them
  18. you mean the name abrove the ped name?
×
×
  • Create New...