Jump to content

danielpaulino

Members
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

danielpaulino's Achievements

Square

Square (6/54)

0

Reputation

  1. Como eu faço para uma mensagem ficar spawnando no chat exempo: a cada 10 min aparecer no CHAT "De /dc para copiar o nosso discord"?
  2. Assim? local paydayCommand = "salario" local baseSalary = 5000 local timers = {} local milisseconds = 60000 --// 60sec local hour = milisseconds * 60 --// 1h local theTime = hour * 24 --// 1d function takePayDay(thePlayer, cmd) local playerTime = timers[thePlayer] if not (playerTime) then timers[thePlayer] = timestamp(function() timers[thePlayer] = nil end, theTime, 1) elseif playerTime and isTimer(playerTime) then outputChatBox ("╔═════════════════════════════════════════════════╗", thePlayer, 255, 0, 0) outputChatBox ("ERRO: #FFFFFFNo momento você não pode utilizar esse comando.", thePlayer, 255, 0, 0, true) outputChatBox ("╚═════════════════════════════════════════════════╝", thePlayer, 255, 0, 0) return end local accountName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accountName, aclGetGroup("Ouro")) then givePlayerMoney(thePlayer, baseSalary) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..baseSalary.."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Platina")) then givePlayerMoney(thePlayer, baseSalary + 750) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 750).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Diamante")) then givePlayerMoney(thePlayer, baseSalary + 1500) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 1500).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Rubi")) then givePlayerMoney(thePlayer, baseSalary + 2500) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 2500).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) end end addCommandHandler(paydayCommand, takePayDay) addEventHandler ("onPlayerLogout", getRootElement(), function (thePreviousAccount, theCurrentAccount) local timerDetails = getTimerDetails (timers[source]) setAccountData (thePreviousAccount, "DeltaSCR:Timers", timerDetails) end) addEventHandler ("onPlayerQuit", getRootElement(), function() if isTimer(timers[source]) then local timerDetails = getTimerDetails (timers[source]) setAccountData (getPlayerAccount(source), "DeltaSCR:Timers", timerDetails) killTimer(timers[source]) end timers[source] = nil end) addEventHandler ("onPlayerLogin", getRootElement(), function (thePreviousAccount, theCurrentAccount) local dataTimer = getAccountData (theCurrentAccount, "DeltaSCR:Timers") if dataTimer then setAccountData (theCurrentAccount, "DeltaSCR:Timers", false) timers[source] = timestamp (function () timers[source] = nil end, dataTimer, 1) end end)
  3. O script era para O player que possui o vip ( ouro, platina, diamante, rubi) Receberá uma quantia em dinheiro todo dia. mas ta bugando tem hora que pode pegar sempre. nao to conseguindo resolver me ajuda. local paydayCommand = "salario" local baseSalary = 5000 local timers = {} local milisseconds = 60000 --// 60sec local hour = milisseconds * 60 --// 1h local theTime = hour * 24 --// 1d function takePayDay(thePlayer, cmd) local playerTime = timers[thePlayer] if not (playerTime) then timers[thePlayer] = setTimer(function() timers[thePlayer] = nil end, theTime, 1) elseif playerTime and isTimer(playerTime) then outputChatBox ("╔═════════════════════════════════════════════════╗", thePlayer, 255, 0, 0) outputChatBox ("ERRO: #FFFFFFNo momento você não pode utilizar esse comando.", thePlayer, 255, 0, 0, true) outputChatBox ("╚═════════════════════════════════════════════════╝", thePlayer, 255, 0, 0) return end local accountName = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user."..accountName, aclGetGroup("Ouro")) then givePlayerMoney(thePlayer, baseSalary) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..baseSalary.."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Platina")) then givePlayerMoney(thePlayer, baseSalary + 750) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 750).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Diamante")) then givePlayerMoney(thePlayer, baseSalary + 1500) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 1500).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) elseif isObjectInACLGroup("user."..accountName, aclGetGroup("Rubi")) then givePlayerMoney(thePlayer, baseSalary + 2500) outputChatBox ("╔═════════════════════════════════════════════════╗", root, 0, 200, 75) outputChatBox ("INFO: #FFFFFFO jogador "..getPlayerName(thePlayer).." #ffffffresgatou o seu sálario no valor de R$"..(baseSalary + 2500).."", root, 0, 200, 75, true) outputChatBox ("╚═════════════════════════════════════════════════╝", root, 0, 200, 75) end end addCommandHandler(paydayCommand, takePayDay) addEventHandler ("onPlayerLogout", getRootElement(), function (thePreviousAccount, theCurrentAccount) local timerDetails = getTimerDetails (timers[source]) setAccountData (thePreviousAccount, "DeltaSCR:Timers", timerDetails) end) addEventHandler ("onPlayerQuit", getRootElement(), function() if isTimer(timers[source]) then local timerDetails = getTimerDetails (timers[source]) setAccountData (getPlayerAccount(source), "DeltaSCR:Timers", timerDetails) killTimer(timers[source]) end timers[source] = nil end) addEventHandler ("onPlayerLogin", getRootElement(), function (thePreviousAccount, theCurrentAccount) local dataTimer = getAccountData (theCurrentAccount, "DeltaSCR:Timers") if dataTimer then setAccountData (theCurrentAccount, "DeltaSCR:Timers", false) timers[source] = setTimer (function () timers[source] = nil end, dataTimer, 1) end end)
  4. ah ok vlw assim? 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 addEvent("onSendMoney", true) addEventHandler("onSendMoney", getRootElement(), function(who, player) local money = getPlayerMoney(source) if player ~= nil then if tonumber(player) >= 200 then if tonumber(player) <= money then toWho = getPlayerID(id) conta = getPlayerAccount (source) if isGuestAccount (conta) then outputChatBox("#FFFF00Você precisa estar logado.", source, 255, 255, 255, true) return end id = getPlayerName ( toWho ) if toWho ~= false then givePlayerMoney(toWho, player) takePlayerMoney(source, player) name = getPlayerName(source) outputChatBox("#FFFF00Você transferiu #00ff00R$" .. player .. "#FFFF00 para #FFFF00" .. nick_do_jogador, source, 255, 255, 255, true) outputChatBox("" [id]" #FFFF00lhe transferiu #FFFF00R$" .. player .. " #FFFF00!", toWho, 255, 255, 255, true) else outputChatBox("#FFFF00Você não selecionou um jogador da lista!", source, 255, 255, 255,true) end else outputChatBox("#FFFF00Você não tem dinheiro suficiente!", source, 255, 255, 255,true) end else outputChatBox("#FFFF00 O valor mínimo de transferências é R$ 200 !", source, 255, 255, 255,true) end end end ) function setAnimation(animationBlock,animationID) if getElementData(source,"PlayerCaido") then outputChatBox("#FFFF00Você não pode usar animações enquanto espera por um samu.", source, 255, 255, 255, true) return end setPedAnimation(source,animationBlock,animationID) end addEvent("setAnimation",true) addEventHandler ("setAnimation",root,setAnimation) function PararAnS() if getElementData(source,"PlayerCaido") then outputChatBox("#FFFF00Você não pode usar animações enquanto espera por um samu.", source, 255, 255, 255, true) return end setPedAnimation(source,nil,nil) end addEvent("setAnimationNil",true) addEventHandler ("setAnimationNil",root,PararAnS) GroupName = "Mecanico" GroupName2 = "Uber" GroupName3 = "Policia" GroupName4 = "SAMU" function ChamarPolicia () local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#00BFFFVocê chamou a policia, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName2 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName3 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName4 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName5 ) ) or isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName6 ) ) ) then outputChatBox("#00BFFF"..getPlayerName(source).." precisa de um policial em "..loc.." ("..city..")", player, 255, 255, 255, true) displayServerMessage(player, ""..getPlayerName(source).." precisa de um policial em "..loc.." ("..city..")", "warning") local blip = createBlipAttachedTo ( source, 30 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addEvent( "ChamarAPolicia", true ) addEventHandler( "ChamarAPolicia", root, ChamarPolicia) function ChamarSamu () local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#FF0000Você chamou os médicos, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName4) ) ) then outputChatBox("#FF0000"..getPlayerName(source).." precisa do SAMU em "..loc.." ("..city..")", player, 255, 255, 255, true) displayServerMessage(player, ""..getPlayerName(source).." precisa do SAMU em "..loc.." ("..city..")", "warning") local blip = createBlipAttachedTo ( source, 22 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addEvent( "ChamarOSamu", true ) addEventHandler( "ChamarOSamu", root, ChamarSamu) function ChamarMecanico () local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#FFFF00Você chamou um mecânico, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName) ) ) then outputChatBox("#FFFF00"..getPlayerName(source).." precisa de um mecânico em "..loc.." ("..city..")", player, 255, 255, 255, true) displayServerMessage(player, ""..getPlayerName(source).." precisa de um mecânico em "..loc.." ("..city..")", "warning") local blip = createBlipAttachedTo ( source, 27 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addEvent( "ChamarOMecanico", true ) addEventHandler( "ChamarOMecanico", root, ChamarMecanico) function ChamarTaxista () local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#00FFFFVocê chamou um uber, aguarde.", source, 255, 255, 255, true) for theKey,player in ipairs (getElementsByType("player")) do local accName = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName2) ) ) then outputChatBox("#00FFFF"..getPlayerName(source).." precisa de um uber em "..loc.." ("..city.."), localize-o em seu GPS", player, 255, 255, 255, true) displayServerMessage(player, ""..getPlayerName(source).." precisa de um uber em "..loc.." ("..city.."), localize-o em seu GPS", "warning") local blip = createBlipAttachedTo ( source, 56 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end end end addEvent( "ChamarOTaxista", true ) addEventHandler( "ChamarOTaxista", root, ChamarTaxista) function ErroL () outputChatBox("#FFFF00Você não pode enviar a localização para sí mesmo.", source, 255, 255, 255, true) end addEvent( "ErroLoc", true ) addEventHandler( "ErroLoc", root, ErroL) function EnviarL (player) local x, y, z = getElementPosition(source) local loc = getZoneName ( x, y, z ) local city = getZoneName ( x, y, z, true ) outputChatBox("#FFFF00Você mandou sua localização para "..getPlayerName(player), source, 255, 255, 255, true) outputChatBox("#FFFF00"..getPlayerName(source).." enviou a própria localização para você. "..loc.." ("..city..")", player, 255, 255, 255, true) local blip = createBlipAttachedTo ( source, 41 ) setElementVisibleTo(blip, root, false) setElementVisibleTo(blip, player, true) setTimer ( function() destroyElement(blip) end, 270000, 1) end addEvent( "EnviarLocalizacao", true ) addEventHandler( "EnviarLocalizacao", root, EnviarL) -----------------------------------Policia local chatSystemDB = dbConnect( 'sqlite', 'Chat System - Database.db' ) dbExec( chatSystemDB, 'CREATE TABLE IF NOT EXISTS `Chat_System` (sourceSerial, blockedSerial)' ) addEvent( 'onServerCheckShow', true ); addEventHandler( 'onServerCheckShow', root, function( player, name ) if ( player and player ~= source ) then triggerClientEvent( player, 'onClientShowWrite', source, source, name ) end end ); addEvent( 'onServerCheckHide', true ); addEventHandler( 'onServerCheckHide', root, function( player ) if ( player and player ~= source ) then triggerClientEvent( player, 'onClientHideWrite', source, source ) end end ); addEvent( 'onServerCheckIfBlocked', true ); addEventHandler( 'onServerCheckIfBlocked', root, function( serial ) local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results ~= 0 ) then outputChatBox( '#FF0000• ERROR :#FFFFFF Sorry, You cannot send a message to this player .. it\'s blocked !', source, 255, 255, 255, true ) return end local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', serial, getPlayerSerial( source ) ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results ~= 0 ) then outputChatBox( '#FF0000• ERROR :#FFFFFF Sorry, You cannot send a message to this player .. he was blocked you !', source, 255, 255, 255, true ) return end triggerClientEvent( source, 'buildChattingWith', source ) end ); addEvent( 'onServerSendPoke', true ); addEventHandler( 'onServerSendPoke', root, function( player, serial ) local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results ~= 0 ) then outputChatBox( '#FF0000• ERROR :#FFFFFF Sorry, You cannot send a poke to this player .. it\'s blocked or he was blocked you !', source, 255, 255, 255, true ) return end if ( getElementData( player, 'chatStatus' ) == 'Offline' ) then outputChatBox( '#FF0000• ERROR :#FFFFFF Sorry, You cannot send a poke to this player .. it\'s offline !', source, 255, 255, 255, true ) return end triggerClientEvent( player, 'onClientPokePlayer', source, getPlayerName( source ) ) end ); addEvent( 'onServerCheckBlockStatus', true ); addEventHandler( 'onServerCheckBlockStatus', root, function( serial ) local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then triggerClientEvent( source, 'onClientChangeButton', source, 'Block Player' ) return end triggerClientEvent( source, 'onClientChangeButton', source, 'Unblock Player' ) end ); addEvent( 'onServerBlockPlayer', true ); addEventHandler( 'onServerBlockPlayer', root, function( serial, player ) local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results ~= 0 ) then return end dbExec( chatSystemDB, 'INSERT INTO `Chat_System` VALUES(?,?)', getPlayerSerial( source ), serial ) triggerClientEvent( source, 'onClientChangeButton', source, 'Desbloquear Player' ) triggerClientEvent( player, 'onClientDestroyChats', source, source ) triggerClientEvent( source, 'onClientDestroyChats', source, player ) end ); addEvent( 'onServerUnblockPlayer', true ); addEventHandler( 'onServerUnblockPlayer', root, function( serial ) local check = dbQuery( chatSystemDB, 'SELECT * FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) local results = dbPoll( check, -1 ) if ( type( results ) == 'table' and #results == 0 or not results ) then triggerClientEvent( source, 'onClientChangeButton', source, 'Block Player' ) return end dbExec( chatSystemDB, 'DELETE FROM `Chat_System` WHERE sourceSerial = ? AND blockedSerial = ?', getPlayerSerial( source ), serial ) triggerClientEvent( source, 'onClientChangeButton', source, 'Block Player' ) end ); addEventHandler( 'onPlayerJoin', getRootElement( ), function( ) triggerClientEvent( root, 'onClientAddPlayer', source, source ) end ); addEventHandler( 'onPlayerQuit', getRootElement( ), function( ) triggerClientEvent( root, 'onClientRemovePlayer', source, source ) end ); addEventHandler( 'onPlayerChangeNick', getRootElement( ), function( old, new ) triggerClientEvent( root, 'onClientRemovePlayer_ChangedName', source, source, old ) end ); addEvent( 'onServerSetPlayerSerial', true ); addEventHandler( 'onServerSetPlayerSerial', root, function( ) setElementData( source, 'chatSystem;playerSerial', getPlayerSerial( source ) ) end ); addEvent( 'onServerChangeStatus', true ); addEventHandler( 'onServerChangeStatus', root, function( Status ) triggerClientEvent( root, 'onClientUpdateStatus', source, source, Status ) end ); addEvent( 'onServerSendMessage', true ); addEventHandler( 'onServerSendMessage', root, function( plr, message ) triggerClientEvent( plr, 'onClientReceiveMessage', source, source, message ) end ); addEvent( 'onServerPutPlayers', true ); addEventHandler( 'onServerPutPlayers', root, function( ) for _, player in ipairs( getElementsByType( 'player' ) ) do local plrName = getPlayerName( player ) local plrStatus = getElementData( player, 'privateChatSystem;playerStatus' ) or 'Online' triggerClientEvent( root, 'onClientPutPlayers', player, plrName, plrStatus ) end end ); --------Chat function ScriptCellRR() local jogadores = getElementsByType("player") for _, player in ipairs(jogadores) do local conta = getPlayerAccount(player) local conta2 = getAccountName(getPlayerAccount(player)) if isGuestAccount(conta) then return else if isObjectInACLGroup("user." .. conta2, aclGetGroup("PMERJ")) then setElementData(player, "cpolicia", true) end end end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), ScriptCellRR) function CarregarPolAoLogar(_, account) local conta2 = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user." .. conta2, aclGetGroup("PMERJ")) then setElementData(source, "cpolicia", true) end end addEventHandler("onPlayerLogin", getRootElement(), CarregarPolAoLogar) -- //#Mensages function displayServerMessage(source, message, type) triggerClientEvent(source, "servermessagesCelular", getRootElement(), message, type) end
  5. assim? função adminchat_policia (thePlayer, MessagemANS) local acc = getAccountName (getPlayerAccount (thePlayer)) se isObjectInACLGroup ("user." .. acc, aclGetGroup (Grupo)) e Jogador = string.gsub (getPlayersInACLGroup (thePlayer), "#% x% x% x% x% x% x "," ") ID local = getElementData (thePlayer," ID ") ou" N / C " outputChatBox (" # FFBF00 • Corporação - #ffffff [".. ID .."] - ".. Jogador .." # A4A4A4- # FFBF00 ".. MessagemANS, jogador, 255, 255, 255, isPlayerInACL) Loop end end
  6. boa noite eu baixei um script da internet de celular, e eu não to conseguindo colocar para a transferência de dinheiro seja feita por ID, desde já agradeço function(who, player) local money = getPlayerMoney(source) if player ~= nil then if tonumber(player) >= 200 then if tonumber(player) <= money then toWho = getPlayerFromPartialName(who) conta = getPlayerAccount (source) if isGuestAccount (conta) then outputChatBox("#FFFF00Você precisa estar logado.", source, 255, 255, 255, true) return end nick_do_jogador = getPlayerName ( toWho ) if toWho ~= false then givePlayerMoney(toWho, player) takePlayerMoney(source, player) name = getPlayerName(source) outputChatBox("#FFFF00Você transferiu #00ff00R$" .. player .. "#FFFF00 para #FFFF00" .. nick_do_jogador, source, 255, 255, 255, true) outputChatBox("".. name .. " #FFFF00lhe transferiu #FFFF00R$" .. player .. " #FFFF00!", toWho, 255, 255, 255, true) else outputChatBox("#FFFF00Você não selecionou um jogador da lista!", source, 255, 255, 255,true) end else outputChatBox("#FFFF00Você não tem dinheiro suficiente!", source, 255, 255, 255,true) end else outputChatBox("#FFFF00 O valor mínimo de transferências é R$ 200 !", source, 255, 255, 255,true) end end end )
  7. como eu iria fazer isso? tipo o script do contador q eu usso é esse function contador() local timer = interpolateBetween(deadTime, 0, 0, 0, 0, 0, (getTickCount()-tick)/deadTime, "Linear") local minutes, seconds = convertTime(timer) dxDrawText("Tempo de vida restante: "..minutes..":"..seconds, (screenW * 0.3801) + 1, (screenH * 0.9089) + 1, (screenW * 0.7059) + 1, (screenH * 1.0299) + 1, tocolor(0, 0, 0, 132), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("Tempo de vida restante: #FF0000"..minutes.."#FFFFFF:#FF0000"..seconds, screenW * 0.3801, screenH * 0.9089, screenW * 0.7059, screenH * 1.0299, tocolor(255, 255, 255, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) end
  8. eu ja tentei de tudo mesmo, mas nao entendo muito da programação em Lua
  9. muito obrigado funcionou. so mais uma coisa, aparece uma mensagem la em cima falando "vc tem 3 min para ser curado" so q o contador q aparece embaixo ta errado, ele não começa a contagem do 3 ate o 0, ele começa do 5 e ai ate o 2,59 q da 3 min isso ta certo, o único erro é o contador .Oq eu faço? function contador() local timer = interpolateBetween(deadTime, 0, 0, 0, 0, 0, (getTickCount()-tick)/deadTime, "Linear") local minutes, seconds = convertTime(timer) dxDrawText("Tempo de vida restante: "..minutes..":"..seconds, (screenW * 0.3801) + 1, (screenH * 0.9089) + 1, (screenW * 0.7059) + 1, (screenH * 1.0299) + 1, tocolor(0, 0, 0, 132), 1.00, dxfont0_fonte, "left", "top", false, false, false, false, false) dxDrawText("Tempo de vida restante: #FF0000"..minutes.."#FFFFFF:#FF0000"..seconds, screenW * 0.3801, screenH * 0.9089, screenW * 0.7059, screenH * 1.0299, tocolor(255, 255, 255, 255), 1.00, dxfont0_fonte, "left", "top", false, false, false, true, false) end
  10. O sistema de ID q eu uso é esse function Start_Id ( _, acc ) if eventName == "onPlayerLogin" then setElementData ( source, "ID", getAccountID(acc) or "N/A" ) --outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffID: #00ff00( "..(getAccountID(acc) or "N/A") .." )", root, 255,255,255,true) elseif eventName == "onPlayerLogout" then removeElementData( source, "ID" ) --outputChatBox ( "#00ff00✘ #ffffffLOGIN #00ff00✘➺ #ffffffNick: #00ff00 ( ".. getPlayerName(source) .." #00ff00) #ffffffDeslogou.", root, 255,255,255,true) elseif eventName == "onResourceStart" then for _, player in pairs(getElementsByType("player")) do local acc = getPlayerAccount(player) if not isGuestAccount(acc) then setElementData( source, "ID", getAccountID(acc) or "N/A" ) end end end end addEventHandler("onResourceStart", resourceRoot, Start_Id) addEventHandler("onPlayerLogout", root, Start_Id) addEventHandler("onPlayerLogin", root, Start_Id) 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 --============================================================================================================================-- --=============================-- ----------- ID PLAYER ------------ --=============================-- function getnick(player, command, id, ...) if(id) then local playerID = tonumber(id) if(playerID) then local Player2 = getPlayerID(playerID) if(Player2) then outputChatBox ( "#00ff00✘ #ffffffINFO #00ff00✘➺ #ffffff Nome do Jogador #00ff00" .. getPlayerName(Player2) .."", player, 255,255,255,true) else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffff O Jogador(a) de ID: #00ff00( " .. id .. " ) #ffffffNão Foi Encontrado!", player, 255,255,255,true) end else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffff ID: #00ff00( " .. id .. " ) #ffffffInválido!", player, 255,255,255,true) end else outputChatBox ( "#00ff00✘ #ffffffERRO #00ff00✘➺ #ffffffUse /id #00ff00[#ffffffID#00ff00]", player, 255,255,255,true) end end addCommandHandler("id", getnick)
  11. tipo eu tenho o sistema de ID ja, mas como eu vou saber a data do ID do jogador? hpMin = 15 Tempo = {} ColMedic = {} function getElementData (id) 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 function ChecarVida() for i, player in pairs (getElementsByType("player")) do if not getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 1 then if getElementHealth(player) <= hpMin then removePedFromVehicle(player) setElementData(player, "PlayerCaido", true) setElementFrozen(player, true) setPedAnimation(player, "CRACK", "crckdeth3", 1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end else setPedAnimation(player, "CRACK", "crckdeth3", 1, false, true, false) end end end setTimer(ChecarVida, 200, 0) function ChecarVidaA() for i, player in pairs (getElementsByType("player")) do if getElementData(player, "PlayerCaido") then local conta = getAccountName(getPlayerAccount(player)) if getElementHealth(player) >= 31 then setElementData(player, "PlayerCaido", false) setPedAnimation(player, false) setElementFrozen(player, false ) end end end end setTimer(ChecarVidaA, 200, 0) function SetarCaidoComHS() player = source if not getElementData(player, "PlayerCaido") then removePedFromVehicle(player) setElementHealth(player, 20) setElementData(player, "PlayerCaido", true) setPedAnimation(player, "CRACK", "crckdeth3", 1, false, true, false) setTimer(function() if getElementData(player, "PlayerCaido") then killPlayer(player) end end, 240000, 1) end end addEvent("OnHS", true) addEventHandler("OnHS", getRootElement(), SetarCaidoComHS) function curar_jogador ( thePlayer, comando, nick ) if nick then if getElementData ( id ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Samu") ) then local player_a_ser_curado = getElementData ( id ) local samux, samuy, samuz = getElementPosition ( thePlayer ) local curadox, curadoy, curadoz = getElementPosition ( player_a_ser_curado ) local dist = getDistanceBetweenPoints3D ( samux, samuy, samuz, curadox, curadoy, curadoz ) if player_a_ser_curado == thePlayer then outputChatBox("#bebebeVocê não pode se curar!",thePlayer,255,255,255,true) return end if ( dist > 3 ) then outputChatBox("#bebebeChegue mais perto do jogador!", thePlayer, 255, 255, 255, true) elseif ( dist < 3 )then setPedAnimation( thePlayer, "MEDIC", "CPR", 4500, true, false, false, false) setTimer ( function() setElementHealth ( player_a_ser_curado, 100 ) setPedAnimation(player_a_ser_curado, false) setElementFrozen( player_a_ser_curado, false ) setElementData(player_a_ser_curado,"PlayerCaido",false) end, 4500, 1 ) end end end end end addCommandHandler ( "curar", curar_jogador ) Assim?
×
×
  • Create New...