Jump to content

PashaBiceps

Members
  • Posts

    115
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by PashaBiceps

  1. Em dois dos meus comandos está dando um erro que não permite que eles funcionem. Obrigado pela ajuda possível. Attempt to concatenate local 'ingmaconha' (a boolean value) Attempt to concatenate local 'maconha' (a boolean value) addCommandHandler("vering", function(player) --if (playerTraficante[player]) thenx local ingmaconha = getElementData(player,"droga.sementes") <<<<<<<<<<<< ERROOOO local ingax1 = getElementData(player,"droga.ingax1") local ingax2 = getElementData(player,"droga.ingax2") local ingcoca1 = getElementData(player,"droga.ingcoca1") local ingcoca2 = getElementData(player,"droga.ingcoca2") local ingcoca3 = getElementData(player,"droga.ingcoca3") outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingmaconha.." #FFFFFFfolha(s) de Canábis.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingax1.." #FFFFFFgrama(s) de Peróxido de Hidrogênio.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingax2.." #FFFFFFlitro(s) de Isosafrol.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingcoca1.." #FFFFFFfolha(s) de Cocaína.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingcoca2.." #FFFFFFgrama(s) de Bicarbonato de Sódio.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ingcoca3.." #FFFFFFlitro(s) de Etanol.", player, 255, 255, 255, true); --end end ) addCommandHandler("verdrogas", function(player) --if (playerTraficante[player]) then local maconha = getElementData(player,"droga.maconha") <<<<<<<<<<<< ERRRO local ax = getElementData(player,"droga.ax") local coca = getElementData(player,"droga.coca") outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..maconha.." #FFFFFFgrama(s) de Canábis.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..ax.." #FFFFFFgrama(s) de Ecstasy.", player, 255, 255, 255, true); outputChatBox("#996600[Traficante] #FFFFFF"..getPlayerName(player).." #FFFFFFestá atualmente com #009900"..coca.." #FFFFFFgrama(s) de Cocaína.", player, 255, 255, 255, true); --end end )
  2. Resolvido! Alterei a atribuição da data de todo script disto playerAx[player] = playerAx[player] + 500; para isto setElementData(source,"droga.ax",getElementData(source,"droga.ax")+500)
  3. No debugscript não dá qualquer erro. Porém apenas a data "trabalhotr" apareceu na base de dados. O resto não está salvando.
  4. Bom, ainda não salvou, talvez porque eu não esteja adicionando a data corretamente. Eu uso isso para atribuir o bagulho no fim do trabalho por exemplo. playerAx[player] = playerAx[player] + 500; Não terei de adicionar à data de um modo diferente? Obrigado pela resposta anterior
  5. Its zipped, thanks a loot
  6. Hi guys, i'm with an error. Is here some of my code, where error appear. I marked the line of the error! On my localhost, my script works perfectly, but in the host gave me this error. Thanks in Advance for any help attempt to get length of local 'table' (a nil value) local time = getRealTime() local days = tonumber(time.monthday) local months = tonumber(time.month) local years = tonumber(time.year) local table = db:query("SELECT * FROM Royal WHERE Usuario=? LIMIT 1", user) Error >>>> if #table > 0 then setElementData(source, "ID", table[1]["ID"]) db:query("UPDATE Royal SET Nick=?, Acesso=?, Serial=? WHERE Usuario=?", getPlayerName(source):gsub("#%x%x%x%x%x%x", ""), days.."/"..months+(1).."/"..years-(100), getPlayerSerial(source), user) outputDebugString("Dados de usuário carregados!", 0, 145, 212, 17) setTimer(setCameraTarget, 3000, 1, source, source) setTimer(triggerClientEvent, 14000, 1, source, "renderQ", source) triggerClientEvent(source, "onRoyalLogin", source) outputLoginMsg(source, "Logado com sucesso! Aguarde...", "success") else outputLoginMsg(source, "Dados desta conta não foram encontrados em nosso banco de dados.", "error") end
  7. Antes de mais obrigado pela resposta Bom, eu por meu erro estava chamando uma tabela, sendo não possível fazê-lo. Troquei esta local que estava chamando a tabela local trabalhotr = playerTraficante ( source ) Por esta local que chama a Data local trabalhotr = playerTraficante[source] Mas ainda não está salvando essa data, está dando outro erro nessa linha ( Linha 2 ) local playeraccount = getPlayerAccount ( source ) ERRO >> Bad argument @ 'getPlayerAccount' [Expected player or console at argument 1, got resource] Salvamento ( como ele está agora ) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local trabalhotr = playerTraficante[source] local ax = playerAx[source] local coca = playerCoca[source] local bagulho = playerBagulho[source] local IngAx1 = playerIngAx1[source] local IngAx2 = playerIngAx2 [source] local IngCoca1 = playerIngCoca1 [source] local IngCoca2 = playerIngCoca2 [source] local IngCoca3 = playerIngCoca3 [source] local sementes = playerSementes [source] setAccountData ( playeraccount, "trabalhotr", trabalhotr ) setAccountData ( playeraccount, "droga.ax", ax ) setAccountData ( playeraccount, "droga.coca", coca ) setAccountData ( playeraccount, "droga.maconha", bagulho ) setAccountData ( playeraccount, "droga.ingax1", IngAx1 ) setAccountData ( playeraccount, "droga.ingax2", IngAx2 ) setAccountData ( playeraccount, "droga.ingcoca1", IngCoca1 ) setAccountData ( playeraccount, "droga.ingcoca2", IngCoca2 ) setAccountData ( playeraccount, "droga.ingcoca3", IngCoca3 ) setAccountData ( playeraccount, "droga.sementes", sementes ) end end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local trabalhotr = getAccountData ( playeraccount, "trabalhotr" ) local ax = getAccountData ( playeraccount, "droga.ax" ) local coca = getAccountData ( playeraccount, "droga.coca" ) local bagulho = getAccountData ( playeraccount, "droga.maconha" ) local IngAx1 = getAccountData ( playeraccount, "droga.ingax1" ) local IngAx2 = getAccountData ( playeraccount, "droga.ingax2" ) local IngCoca1 = getAccountData ( playeraccount, "droga.ingcoca1" ) local IngCoca2 = getAccountData ( playeraccount, "droga.ingcoca2" ) local IngCoca3 = getAccountData ( playeraccount, "droga.ingcoca3" ) local sementes = getAccountData ( playeraccount, "droga.sementes" ) if ( trabalhotr ) then setAccountData ( source, trabalhotr ) end if ( ax ) then setAccountData ( source, ax ) end if ( coca ) then setAccountData ( source, coca ) end if ( bagulho ) then setAccountData ( source, bagulho ) end if ( IngAx1 ) then setAccountData ( source, IngAx1 ) end if ( IngAx2 ) then setAccountData ( source, IngAx2 ) end if ( IngCoca1 ) then setAccountData ( source, IngCoca1 ) end if ( IngCoca2 ) then setAccountData ( source, IngCoca2 ) end if ( IngCoca3 ) then setAccountData ( source, IngCoca3 ) end if ( sementes ) then setAccountData ( source, sementes ) end end end addEventHandler ( "onResourceStop", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onResourceStart", getRootElement ( ), onPlayerLogin ) addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  8. Omg, i just can be idiot haha I already done my script, but instead of call the exact data, i was calling the tables ! Thanks a lot
  9. Without Success, probably i need change all my script. Don't have another way to save this data from local tables? Thanks for helping me
  10. It's my own script, i used tables on Global Locals like this and a lot of many. local playerBagulho = {}; I will try use something like that to see if it works local traficante = playerTraficante();
  11. Hi guys, im trying save some data onPlayerLogin, Quit, Resource Start and Stop but without success. Whats is wrong? I got an error. Thanks in Advance for any help attempt to call upvalue 'playerTraficante' (a table value) -- > ERROR function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local trabalhotr = playerTraficante ( source ) local ax = playerAx ( source ) local coca = playerCoca ( source ) local bagulho = playerBagulho ( source ) local IngAx1 = playerIngAx1 ( source ) local IngAx2 = playerIngAx2 ( source ) local IngCoca1 = playerIngCoca1 ( source ) local IngCoca2 = playerIngCoca2 ( source ) local IngCoca3 = playerIngCoca3 ( source ) local sementes = playerSementes ( source ) setAccountData ( playeraccount, "trabalhotr", trabalhotr ) setAccountData ( playeraccount, "droga.ax", ax ) setAccountData ( playeraccount, "droga.coca", coca ) setAccountData ( playeraccount, "droga.maconha", bagulho ) setAccountData ( playeraccount, "droga.ingax1", IngAx1 ) setAccountData ( playeraccount, "droga.ingax2", IngAx2 ) setAccountData ( playeraccount, "droga.ingcoca1", IngCoca1 ) setAccountData ( playeraccount, "droga.ingcoca2", IngCoca2 ) setAccountData ( playeraccount, "droga.ingcoca3", IngCoca3 ) setAccountData ( playeraccount, "droga.sementes", sementes ) end end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local trabalhotr = getAccountData ( playeraccount, "trabalhotr" ) local ax = getAccountData ( playeraccount, "droga.ax" ) local coca = getAccountData ( playeraccount, "droga.coca" ) local bagulho = getAccountData ( playeraccount, "droga.maconha" ) local IngAx1 = getAccountData ( playeraccount, "droga.ingax1" ) local IngAx2 = getAccountData ( playeraccount, "droga.ingax2" ) local IngCoca1 = getAccountData ( playeraccount, "droga.ingcoca1" ) local IngCoca2 = getAccountData ( playeraccount, "droga.ingcoca2" ) local IngCoca3 = getAccountData ( playeraccount, "droga.ingcoca3" ) local sementes = getAccountData ( playeraccount, "droga.sementes" ) if ( trabalhotr ) then setAccountData ( source, trabalhotr ) end if ( ax ) then setAccountData ( source, ax ) end if ( coca ) then setAccountData ( source, coca ) end if ( bagulho ) then setAccountData ( source, bagulho ) end if ( IngAx1 ) then setAccountData ( source, IngAx1 ) end if ( IngAx2 ) then setAccountData ( source, IngAx2 ) end if ( IngCoca1 ) then setAccountData ( source, IngCoca1 ) end if ( IngCoca2 ) then setAccountData ( source, IngCoca2 ) end if ( IngCoca3 ) then setAccountData ( source, IngCoca3 ) end if ( sementes ) then setAccountData ( source, sementes ) end end end addEventHandler ( "onResourceStop", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onResourceStart", getRootElement ( ), onPlayerLogin ) addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  12. Não consegui por a salvar, dá este erro. Obrigado pela ajuda attempt to call upvalue 'playerTraficante' (a table value) function onPlayerQuit ( ) local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) and not isGuestAccount ( playeraccount ) then local trabalhotr = playerTraficante ( source ) local ax = playerAx ( source ) local coca = playerCoca ( source ) local bagulho = playerBagulho ( source ) local IngAx1 = playerIngAx1 ( source ) local IngAx2 = playerIngAx2 ( source ) local IngCoca1 = playerIngCoca1 ( source ) local IngCoca2 = playerIngCoca2 ( source ) local IngCoca3 = playerIngCoca3 ( source ) local sementes = playerSementes ( source ) setAccountData ( playeraccount, "trabalhotr", trabalhotr ) setAccountData ( playeraccount, "droga.ax", ax ) setAccountData ( playeraccount, "droga.coca", coca ) setAccountData ( playeraccount, "droga.maconha", bagulho ) setAccountData ( playeraccount, "droga.ingax1", IngAx1 ) setAccountData ( playeraccount, "droga.ingax2", IngAx2 ) setAccountData ( playeraccount, "droga.ingcoca1", IngCoca1 ) setAccountData ( playeraccount, "droga.ingcoca2", IngCoca2 ) setAccountData ( playeraccount, "droga.ingcoca3", IngCoca3 ) setAccountData ( playeraccount, "droga.sementes", sementes ) end end function onPlayerLogin (_, playeraccount ) if ( playeraccount ) then local trabalhotr = getAccountData ( playeraccount, "trabalhotr" ) local ax = getAccountData ( playeraccount, "droga.ax" ) local coca = getAccountData ( playeraccount, "droga.coca" ) local bagulho = getAccountData ( playeraccount, "droga.maconha" ) local IngAx1 = getAccountData ( playeraccount, "droga.ingax1" ) local IngAx2 = getAccountData ( playeraccount, "droga.ingax2" ) local IngCoca1 = getAccountData ( playeraccount, "droga.ingcoca1" ) local IngCoca2 = getAccountData ( playeraccount, "droga.ingcoca2" ) local IngCoca3 = getAccountData ( playeraccount, "droga.ingcoca3" ) local sementes = getAccountData ( playeraccount, "droga.sementes" ) if ( trabalhotr ) then setAccountData ( source, trabalhotr ) end if ( ax ) then setAccountData ( source, ax ) end if ( coca ) then setAccountData ( source, coca ) end if ( bagulho ) then setAccountData ( source, bagulho ) end if ( IngAx1 ) then setAccountData ( source, IngAx1 ) end if ( IngAx2 ) then setAccountData ( source, IngAx2 ) end if ( IngCoca1 ) then setAccountData ( source, IngCoca1 ) end if ( IngCoca2 ) then setAccountData ( source, IngCoca2 ) end if ( IngCoca3 ) then setAccountData ( source, IngCoca3 ) end if ( sementes ) then setAccountData ( source, sementes ) end end end addEventHandler ( "onResourceStop", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onResourceStart", getRootElement ( ), onPlayerLogin ) addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) addEventHandler ( "onPlayerLogin", getRootElement ( ), onPlayerLogin )
  13. Olá gente, eu acabei o meu script o que está acontecendo é que o jogador perde tudo quando o resource reinicia ou quando o jogador reloga. Como eu posso salvar algo desse tipo? playerCoca[player] = 0; playerBalde[player] = 0; playerTraficante[player] = 0; Obrigado desde já
  14. PashaBiceps

    Help CP

    I have a question, if i have two or more local markers created, how i can add more markers for example in this funcion on isElementWithinMarker? I'm doing a harverst system and i want put more cp's working for the same. The player choose the marker where he want do it My problem is, just one marker work on isElementWithinMarker, how i can add more correctly on isElementWithinMarker? Thanks in advance local dutymarker = createMarker(126.56, 254.98, 78.9, "cylinder", 2.0, 255, 0, 0, 150) function duty(thePlayer) if isElementWithinMarker(thePlayer, dutymarker) then giveWeapon(thePlayer, 22, 100, 1) else outputChatBox("You are not at the right place!", thePlayer, 255, 0, 0) end end addCommandHandler("duty", duty)
  15. Com certeza ajudou, muito obrigado Resolvido.
  16. Eu estou fazendo um sistema de revistar o jogador para a polícia, no entanto, só está a aparecer a arma que o jogador tem na mão, se o jogador tiver armas e não estiver com elas na mão não deteta, diz que está desarmado. Eu entendo porque o comando está assim mesmo, mas como posso fazer para no momento de revistar diga todas as armas do jogador? Já tentei dessas duas formas, porém ambas só me diz o que o jogador tem na mão e não em todas Obrigado desde já local weaponType = getPedWeapon ( jogador_revistado ) if ( weaponType ) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está #ff0000armada#ffffff com um(a) ".. weaponType .."!", thePlayer, 255, 255, 255, true) else outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está completamente desarmada!", thePlayer, 255, 255, 255, true) end if (pedSlot == 0) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa está completamente desarmada!", thePlayer, 255, 255, 255, true) end if (pedSlot == 1) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffff99faca#ffffff!", thePlayer, 255, 255, 255, true) end if (pedSlot == 2) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffff00pistola#ffffff!", thePlayer, 255, 255, 255, true) end if (pedSlot == 3) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffcc00caçadeira#ffffff!", thePlayer, 255, 255, 255, true) end if (pedSlot == 4) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ffcc00SMG#ffffff!", thePlayer, 255, 255, 255, true) end if (pedSlot == 5) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo um #ff6600Rifle#ffffff!", thePlayer, 255, 255, 255, true) end if (pedSlot == 6) then outputChatBox("#000000[#4286f4PSP#000000]#ffffff Essa pessoa tem consigo uma #ff0000Sniper#ffffff!", thePlayer, 255, 255, 255, true) end
  17. Olá gente, está acontecendo uma coisa no meu servidor que não estou conseguindo resolver. Bom nos meus trabalhos, quando tem 1 jogador trabalhando funciona perfeitamente. Mas quando tem dois ou mais, o jogador recebe tantas mensagens como o número de jogadores no servidor. Um exemplo aqui de uma parte do trabalho, onde a duplicação monstruosa acontece, marquei a mensagem onde começa a duplicação. Obrigado desde já pela ajuda addEventHandler("onMarkerHit", getPayment, function(player) if (playerPescador[player]) then if (getElementDimension(player) == 0) then for i, p in ipairs( getElementsByType( "player" ) ) do local exps = tonumber(getElementData(p, "Exp")) local peixe = playerPeixes[player] or 0; local money = config.money * peixe + math.random(100, 1000); --local EXP = 0.5 * peixe; if (peixe >= config.minPeixe) then outputChatBox("#33ccff[Pescador] #32CD32Sucesso. #FFFFFFTu vendes-te "..peixe.." #FFFFFF peixe(s)! Recebes-te #008500$"..money.."#FFFFFF e 2% de XP!", player, 255, 255, 255, true); <----- ESTA MENSAGEM DUPLICAA givePlayerMoney(player, money); setElementData(player, "Exp", exps + 0.4) playerPeixes[player] = 0; else outputChatBox("#33ccff[Pescador] #FF3232Falha! #FFFFFFÉ necessário pelo menos #33ccff"..(config.minPeixe).." peixe #FFFFFFpara o venderes, tu tens #33ccff"..peixe.."#FFFFFF.", player, 255, 255, 255, true); end end end else addNotification(player, "Não és pescador!", "error") end end )
  18. Tentei mas não funcionou, infelizmente function enterVehicle ( theVehicle, seat, jacked ) if getElementData ( theVehicle, "engineon" ) then setVehicleEngineState (vehicle, true) elseif getElementData ( theVehicle, "engineoff" ) then setVehicleEngineState (vehicle, false) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle ) function enterVehicle1 ( theVehicle, seat, jacked ) if getElementData ( theVehicle, "lightson" ) then setVehicleOverrideLights (vehicle, 2) elseif getElementData ( theVehicle, "lightsoff" ) then setVehicleOverrideLights (vehicle, 1) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle1 ) --//Engine On / Off function engine (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleEngineState (vehicle) == false then setVehicleEngineState (vehicle, true) outputChatBox ("Motor ligado!", src, 0, 255, 0) setElementData(vehicle,"engineon") else setVehicleEngineState (vehicle, false) outputChatBox ("Motor desligado!", src, 255, 0, 0) setElementData(vehicle,"engineoff") end else return false end end addCommandHandler ("motor", engine) --//-- --//Vehicle Lights function lights (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("Luzes ligadas!", src, 0, 255, 0) setElementData(vehicle,"lightson") else setVehicleOverrideLights (vehicle, 1) outputChatBox ("Luzes desligadas!", src, 255, 0, 0) setElementData(vehicle,"lightsoff") end else return false end end addCommandHandler ("luzes", lights)
  19. Sim funciona, o problema é que sempre vai estar desligado quando entrar. O que eu gostaria era se o jogador deixar o carro ligado ele continuar ligado e se ele desligar o carro ficar desligado e ele ter de o ligar.
  20. Eu tentei isso, mas não funcionou function enterVehicle ( theVehicle, seat, jacked ) if getVehicleEngineState (theVehicle) == true then setTimer(setVehicleEngineState,500,1, theVehicle,true) else setTimer(setVehicleEngineState,500,1, theVehicle,false) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), enterVehicle )
  21. Boas gente, estou com um problema em um meu script. Eu desligo o motor do meu carro e as luzes.. Saio por algum motivo do veículo, quando entro no carro o motor e as luzes já se ligam automaticamente. O que está havendo como posso resolver? Obrigado desde já a toda ajuda addEventHandler("onPlayerLogin", root, function() bindKey(source, "l", "down", lights) bindKey(source, "j", "down", engine) end) addEventHandler("onResourceStart", resourceRoot, function() for _, v in pairs (getElementsByType("player")) do bindKey(v, "l", "down", lights) bindKey(v, "j", "down", engine) end end) --//Engine On / Off function engine (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleEngineState (vehicle) == false then setVehicleEngineState (vehicle, true) outputChatBox ("Motor ligado!", src, 0, 255, 0) else setVehicleEngineState (vehicle, false) outputChatBox ("Motor desligado!", src, 255, 0, 0) end else return false end end addCommandHandler ("motor", engine) --//-- --//Vehicle Lights function lights (src, cmd) if isPedInVehicle(src) and getPedOccupiedVehicleSeat (src) == 0 then local vehicle = getPedOccupiedVehicle (src) if getVehicleOverrideLights (vehicle) == 1 then setVehicleOverrideLights (vehicle, 2) outputChatBox ("Luzes ligadas!", src, 0, 255, 0) else setVehicleOverrideLights (vehicle, 1) outputChatBox ("Luzes desligadas!", src, 255, 0, 0) end else return false end end addCommandHandler ("luzes", lights)
  22. Hi guys, i have a problem on PlayerDamage. So, almost everything it's fine but my problem is, i want that when i hit someone give me the messages but just give me the messages when somebody hits me. What i can do here? Thanks in advance ! addEventHandler( "onPlayerDamage", root, function (targetElem) if (targetElem and targetElem:getType("player") and source:getWeapon() == 23) then if (source:getData("Venda:Police.Job")) then if (targetElem:getWantedLevel() == 0) then return addNotification(source, "Essa pessoa não está com nível de procurado!", "error"); elseif (not Boxs["Markers"]["Create"]["Vehicle"][source]) then return addNotification(source, "Nenhuma viatura encontrada para levar o sujeito!", "error"); end if (targetElem:getHealth() >= 31) then setElementVisibleTo(Boxs["Markers"]["Create"]["Jail"], source, true); targetElem:setAnimation("ped","CAR_dead_LHS"); targetElem:attach(Boxs["Markers"]["Create"]["Vehicle"][source], 0.2, -1.5, 0, 0, 0, 90); addNotification(targetElem, "Tu acabas-te de ser algemado e preso, espera ser encaminhado para a cadeia.", "info"); addNotification(source, "Tu prendes-te uma pessoa! Leva-a até ao departamento (Sirenes Azuis)", "info"); end end end end )
×
×
  • Create New...