Jump to content

Laikinhax

Members
  • Posts

    4
  • Joined

  • Last visited

Laikinhax's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Ola Boa Tarde eu gostaria de saber como faço para mudar a msg assim que um jogador for banido, queria q mostrasse para todos os jogadores verem no chat O ID (id) foi banido pelo staff (nick do staff) Motivo: (motivo do ban) Tempo : (tempobanido) function showPanel (source) if isPlayerInACL (source, "Console") then triggerClientEvent (source, "onClientOpenPanel", resourceRoot) end end addCommandHandler ("banir", showPanel) function onPanelManager (type, ID, reasonBan, timeBan) local theAccount = getAccountByID (ID) se não theAccount, então retorna outputChatBox ("Este ID é inexistente", client, 255, 0, 0) end if type == "buscar" then local thePlayer = getAccountPlayer (theAccount) se thePlayer then triggerClientEvent (client, "onClientSetInfo", resourceRoot, "info", "Online", removeHex (getPlayerName (thePlayer)), getAccountName (getPlayerAccount (thePlayer)), getAccountSerial (thePlayer), getAccountData theAccount, "ban") ou 0) else triggerClientEvent (client, "onClientSetInfo", resourceRoot, "info", "Offline", "N / A", getAccountName (theAccount), getAccountSerial (theAccount) == "" e "N / A" ou getAccountSerial (theAccount), getAccountData (theAccount, "ban") ou 0) end elseif type == "banir" then local thePlayer = getAccountPlayer (theAccount) se thePlayer, em seguida, serial local = getPlayerSerial (thePlayer) se addBan (nil, nil, serial, cliente, reasonBan, timeBan ) then outputChatBox ("O ID:" ..ID .. "foi banido com sucesso", client, 0, 255, 0) triggerClientEvent (client, "onClientSetInfo", resourceRoot,"clearEdit") end else local serial = getAccountSerial (theAccount) if addBan (nil, nil, serial, client, reasonBan, timeBan) then outputChatBox ("O ID:" ..ID .. "foi banido com sucesso", client, 0, 255, 0) triggerClientEvent (client, "onClientSetInfo", resourceRoot, "clearEdit") local dataBan = getAccountData (theAccount, "ban") ou 0 setAccountData (theAccount, "ban", dataBan + 1) end end end end addEvent ("onPanelManager", verdadeiro ) addEventHandler ("onPanelManager", resourceRoot, onPanelManager) function fPlayerBan() local account = getPlayerAccount(source) if not isGuestAccount(account) then local dataBan = getAccountData(account, "ban") or 0 setAccountData(account, "ban", dataBan + 1) end end addEventHandler("onPlayerBan", root, fPlayerBan) function isPlayerInACL(player, acl) local accountName = getAccountName( getPlayerAccount(player) ) if accountName ~= "guest" and type( aclGetGroup(acl) ) == "userdata" then return isObjectInACLGroup( "user."..accountName, aclGetGroup(acl) ) end return false end function removeHex (s) if type (s) == "string" then while (s: find ("#% x% x% x% x% x% x")) do s = s: gsub ("#% x % x% x% x% x% x "," ") end end return s ou false end
  2. O veiculo so destroi quando o player esta dentro , fora nao funciona Spawndt = createMarker(1166.3742675781,-1263.1636962891,15.250455856323 -1,"cylinder", 1.9, 255, 140, 0, 99) Destroydt = createMarker(1166.2664794922,-1257.7770996094,15.268055915833 -2,"cylinder", 5.0, 128, 0, 0, 99) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end veh = {} function Spawnvtrdt ( thePlayer, comando, nick ) if veh[thePlayer] and isElement( veh[thePlayer] ) then DestroydtElement ( veh[thePlayer] ) veh[thePlayer] = nil end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "SAMU") ) then veh[thePlayer] = createVehicle(416, 1189.8168945313,-1254.3963623047,15.52241897583, 0,0,180) warpPedIntoVehicle ( thePlayer, veh[thePlayer] ) exports.Scripts_Dxmessages:outputDx(thePlayer, "VEICULO CRIADO COM SUCESSO!", "success") else exports.Scripts_Dxmessages:outputDx(thePlayer, "VOCE NAO É DO SAMU PARA PEGAR ESTE VEICULO!", "error") end end addEventHandler("onMarkerHit", Spawndt, Spawnvtrdt) function Destroydtvtrdt ( thePlayer ) if veh[thePlayer] and isElement(veh[thePlayer]) then destroyElement (veh[thePlayer]) exports.Scripts_Dxmessages:outputDx(thePlayer, "VEICULO DESTRUIDO COM SUCESSO!", "success") else end end addEventHandler("onMarkerHit", Destroydt, Destroydtvtrdt) function Destroydt (thePlayer) local veh = getPedOccupiedVehicle(source) if veh then destroyElement(veh) end end addEventHandler ("onPlayerQuit", getRootElement(), Destroydt)
×
×
  • Create New...