-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
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)
-
np men
-
change that to "bases/swat.map"/> "bases/Military.map" />
-
open the base.map and check
-
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
-
function setTimerOnWasted() timer = setTimer(function() guiSetVisible(deathWin, true) end, 30000, 0) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), setTimerOnWasted) killTimer(timer)
-
try this: function setTimerOnWasted() timer = setTimer( function() guiSetVisible(deathWin, true) end ,30000,0) end addEventHandler("onClientPlayerWasted", getLocalPlayer(), setTimerOnWasted) killTimer(timer)
-
save the file .lua with a folder name it like you want and make a meta file for works
-
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)
-
addEventHandler("onClientPedWasted", getRootElement(), function() if isPedDead(source) == true then destroyElement(getPedOccupiedVehicle(source)) end end )
-
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)
-
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)
-
createObject createWeapon getCameraMatrix getProjectileType getCameraRotation
-
I want do the vehicle i own despawn when i quit and spawn when i loggin
-
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)
-
Its posible make a car not spawn when player is quit and spawn when player login?
-
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
-
you mean the name abrove the ped name?