Jump to content

Blaack

Members
  • Posts

    194
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Blaack

  1. ultimaSkin = {} function morrerUltimaSkin() local skin = getElementModel(source) ultimaSkin[source] = skin local lastSkin = ultimaSkin[source] if ultimaSkin[source] then setTimer(setElementModel, 3000, 1, source, lastSkin) ultimaSkin[source] = nil end end addEventHandler ( "onPlayerWasted", root, morrerUltimaSkin ) Tente user este codigo (server.lua)
  2. onPlayerQuit getElementData addBan
  3. Código incompleto, mande como voce adiciona eles na grid quando ela abre!
  4. Me mande o script do inventário no privado? e de remoção de armas também! Corrigirei para você.
  5. Mande o código de seu inventário, para adição e remoção de itens...
  6. function desativeWeapon () toggleControl ( source , "previous_weapon", false ) toggleControl ( source, "next_weapon", false ) end addEventHandler ( "onPlayerJoin", getRootElement(), desativeWeapon) Bom, não testei... Mas imagino que seja assim! Teste
  7. Nesta função, não vejo a função de criar um "drop" de armas... Só vejo um setTimer para spawnar o player!
  8. Olá! Já existe um script deste na internet!! Link
  9. Desculpe, eu fiz na pressa rsrs aonde está; getAccountName(thePlayer) troque por: getAccountName(account)
  10. Boa noite. se mandar o seu código facilitaria nosso trabalho rs
  11. Utilize a function: setPlayerHudComponentVisible
  12. Opa meu querido, boa noite! Bom, seu código está um pouco feinho rs mas vamos lá!!! Tente assim: addEvent("onRequestRegister",true) addEventHandler("onRequestRegister",resourceRoot, function(username,password,repassword,serial) local getAccounts = getAccountsBySerial (getPlayerSerial (client)) if getAccounts[1] then triggerClientEvent (client, "setNotification", resourceRoot, "Você já tem uma conta registrada. User: "..getAccountName(getAccounts[1])) else addAccount() if not (username == "") then if not (password == "") then if not (repassword == "") then if password == repassword then local account = getAccount (username) if (account == false) then local accountAdded = addAccount(tostring(username),tostring(password)) if (accountAdded) then logIn(client,accountAdded,password) triggerClientEvent(client,"onClientPlayerLogin",resourceRoot) triggerClientEvent(client,"useLoginFile",resourceRoot,"set",username,password) outputChatBox("*Logado Com Sucesso! ( Nome de Usuário: #ee8a11" .. username .. " #FFFFFF| Senha: #ee8a11" .. password .. "#FFFFFF )",client,255,255,255,true) else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Escolha Uma Conta E/Ou Senha Diferente") end else triggerClientEvent(client,"setNotification",resourceRoot,"Uma Conta Com Esse Nome De Usuario Ja Existe!") end else triggerClientEvent(client,"setNotification",resourceRoot,"As Senhas Não Coincidem!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Confirme Sua Senha!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Uma Senha Para Criar Sua Nova Conta!") end else triggerClientEvent(client,"setNotification",resourceRoot,"Por Favor, Insira Um Nome De Usuario Para Criar Sua Conta!") end end end )
  13. Bom, tente: function limparacl (thePlayer) local account = getPlayerAccount(thePlayer) local accountName = getAccountName(thePlayer) for _, grupos in ipairs(aclGroupList()) do if isObjectInACLGroup("user." .. accountName, grupos) then aclGroupRemoveObject (aclGetGroup(""..grupos), "user."..accountName) end end outputChatBox("Todas As Acls Foram Removidas Da Sua Conta", thePlayer,255,255,255,true) end addCommandHandler("melimpa", limparacl)
  14. Mude onde está x, y, z para suas coordenadas !
  15. Testa ai: local x, y, z = 0, 0, 0 function primoLogin() spawnPlayer(source, x, y, z) end addEventHandler("onPlayerJoin", getRootElement(), primoLogin)
  16. source, tem que ser definido nos parâmetros ali dentro da function
  17. Server-side mrkpanel = createMarker(1489.361, -1741.148, 13.547 -1,"cylinder",1.2,0,0,255,255) function AbrirPainelBike(hitElement) local thePlayer = hitElement local account = getPlayerAccount (thePlayer) if isGuestAccount (account) then outputChatBox ( "#ff0000✘ #ffffffAGENCIA #ff0000✘➺ #FFFFFFVocê não pode alugar um bike deslogado, Crie uma Conta!", thePlayer, 255,255,255,true) return end if isElementWithinMarker(thePlayer, mrkpanel) then triggerClientEvent("OpenDxBike", thePlayer) -- Player pode ser definido antes, porém tem de ser definido também ( leia o syntax da function) end end addEventHandler("onMarkerHit", mrkpanel, AbrirPainelBike)
  18. va no seu editbox, procure a function de insert word (palavra/letra) e coloque uma verificação (tonumber)
  19. outputDx(player, text, type) use: exports.Scripts_Dxmessages:outputDx (source,"texto", "tipo") tipos existentes: "info", "success", "error", "warning" (se seu script for o msm que o meu kk)
  20. Simples, você não definiu getPlayerID... tente: local chat_range=100 function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onPlayerChatHandler( message, messageType ) if (messageType == 0) then cancelEvent() local px,py,pz=getElementPosition(source) local id = getPlayerID(source) local nick=getPlayerName(source) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox("#32CD32[BVL]#FFFF00 • ʟᴏᴄᴀʟ • #FFFFFF"..nick.." ["..id.."]"": #FFFF00"..message,v,30,30,200,true) end end end end addEventHandler( "onPlayerChat", root, onPlayerChatHandler ) function disableChat (message, messageType) cancelEvent () end addEventHandler ("onPlayerChat", getRootElement(), disableChat) function getPlayerID(id) v = false for i, player in ipairs (getElementsByType("player")) do if getElementData(player, "ID") == id then v = player break end end return v end
  21. Não sei se irá funcionar, but teste: garageCarCube = createMarker (-1903.9000244141,283.5,39.5, "cylinder", 4, 127, 127, 127, 100 ) usingPanel = false addEventHandler ( "onClientMarkerHit", garageCarCube, function ( hitPlayer, matchingDimension ) if (hitPlayer == getLocalPlayer()) then if usingPanel == true then return end local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then usingPanel = true -- Na função de fechar, não esqueca de setar como false !!! guiGridListClear(gridcor) guiSetVisible ( painelBlip, true ) showCursor ( true ) refreshColors() end end end)
  22. Você definiu setElementData completamente indevidamente! Tente: addEventHandler("onPlayerWasted", root, function (ammo, killer, weapon, bodypart) if getElementType ( killer ) == "player" then setElementData(source, "KillerName", getPlayerName(killer)) end end local NameKiller = getElementData(player, "KillerName") or nil if NameKiller ~= nil then outputChatBox("Você morreu para o jogador: #00ff55"..NameKiller.."", player, 255, 255, 255, true) end
×
×
  • Create New...