Jump to content

Dimos7

Members
  • Posts

    1,546
  • Joined

  • Last visited

Everything posted by Dimos7

  1. Dimos7

    How to fix?

    just copy the code and add tags lua /lua
  2. addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) local x, y, z = getElementPosition(theVehicle) if (success) then if getElementType("trailer") then setElementPosition(trailer, x+2, y, z) end outputChatBox("Trailer detached!", thePlayer) else outputChatBox("Trailer not attatched.", thePlayer) end end end addCommandHandler("unhook", unhookTrailer)
  3. use /debugscript 3 and see if there is any erors
  4. Dimos7

    How to fix?

    go here press edit and add [lua@]/lua] remove the @ in lua
  5. addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if (isPedInVehicle(thePlayer)) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) if (success) then outputChatBox("Traller detached!", thePlayer) else outputChatBox("Traller not attatched.". thePlayer) end end end addCommandHandler("unhook", unhookTrailer) try that
  6. addEvnetHandler("onClientPlayerChnageNick", localPlayer, function(oldNick, newNick) outputChatBox(oldNick..."is known as"..newNick) end )
  7. Dimos7

    How to fix?

    put your code in lua tags
  8. addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if (thePlayer and isPedInVehicle(thePlayer)) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) if (success) then outputChatBox("Traller detached!", thePlayer) else outputChatBox("Traller not attatched.". thePlayer) end end end addCommandHandler("unhook", unhookTrailer)
  9. function onLogin(thePreviousAccount, theCurrentAccount, autoLogin) if ~= (isGuestAccount(getPlayerAccount(source))) then local playerskin = getAccountData(theCurrentAccount, "s.skin") setElementModel(source, playerskin) end end addEventHandler("onPlayerLogin", root, onLogin) function onQuit(quitType, reason, resposibleElement) if ~=(isGuestAccount(getPlayerAccount(source))) then local account = getPlayerAccount(source) if account then setAccountData(account, "s.skin", tostring(getPedSkin(source))) end end end addEventHandler("onPlayerQuit", root, onQuit)
  10. omg i didn't see the client
  11. change local accountAdded = addAccount(tostring(username),tostring(password)) to local accountAdded = addAccount(username, password)
  12. addEventHandler("onPlayerDamage", root, function(wp) if wp == 54 then cancelEvent() end end) <meta> <script src"server.lua" type="server"/> </meta>
  13. So you want a script save the player skin?
  14. can post all code see why that happening
  15. addEventHandler("onClientPlayerDamage", root, function(wp) if wp == 54 then cancelEvent() end end )
  16. max = 0 addEventHandler("onPlayerWasted", root, function() for _, player in ipairs(getElementsByType("player")) do if (murder > max ) then setElementData(player, "Kills", murder) end getElementData(player, "Kills") end end )
  17. function broadcast() local sound = playSound("music") setSoundVolume(sound, 1.0) end in music put the mp3 name and path for example if the song is inside a folder named sounds you put sounds/.mp3 that it
  18. function onEnter(thePlayer) local x, y, z = getElementPosition(thePlayer) setElementPosition(thePlayer, -2422.1469, -607.8954, 132.56) setElementFrozen(thePlayer, true) end addEvent("check", true) addEventHandler("check", getRootElement(), onEnter) function bind() bindKey(source, "e", "down", onEnter) end addEventHandler("onPlayerLogin", getRootElement(), bind) function binds() for i, v in ipairs(getElementsByType("player")) do bindKey(v, "e", "down", onEnter) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), binds) I wrote everything in server side
  19. Dimos7

    Need CODE

    function binds() bindKey(key, state, onWaste) end addEventHandler("onClientResourceStarts", getResourceRootElement(getThisResource()), binds) function onWaste() setElementPosition(localPlayer, x, y, z) end addEventHandler("onClientPlayerWasted", getRootElement(), onWaste) that is more les in client side if you wanrt it in server side just tell me key state and position you choose
  20. function binds() bindKey("f", "down", onEnter) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), binds) function onEnter(posX, posY, posZ) local x, y, z = getElementPosition(localPlayer) setElementPosition(localPlayer, -2422.1469, -607.8954, 132.56) end
  21. function showHud() showPlayerHudComponent(source, "radar", true) end addEventHandler("onPlayerLogin", getRootElement(), showHud) function hideHud() showPlayerHudComponent(source, "radar", false) end addEventHandler("onPlayerConnect", getRootElement(), hideHud)
  22. 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.", thePlayer, 255, 255, 255, true) else setAccountPassword(account, newpassword) exports.SAEGMessages:sendClientMessage("[sERVER] The account password has been change.", thePlayer, 255, 255, 255, true) exports.SAEGMessages:sendClientMessage["[ACCOUNT][uSER:"..nCuenta.."] - [NEW PASSWORD:"..newpassword.."].", thePlayer, 255, 255, 255, true) end end end addEvent("Cambiar", true) addEventHandler("Cambiar", getRootElement(), passwordHandler)
×
×
  • Create New...