Jump to content

'~DaLesTe^'

Members
  • Posts

    89
  • Joined

  • Last visited

Details

  • Gang
    Familia Neurotica

Recent Profile Visitors

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

'~DaLesTe^''s Achievements

Transformer

Transformer (11/54)

0

Reputation

  1. @Travis Ótima ideia, porém vai dar muito trabalho em. Se tudo sair como planejado vai ser muito legal....
  2. code dano = {} local player = source function bloquear(source) dano[player] = 1 setTimer(tirar,8000,1,source) end addEventHandler ( "onPlayerDamage", root, bloquear ) function tirar(source) dano[player] = 0 end function clientPickupHit(thePlayer,pickup, matchingDimension) local pickupType = getPickupType( source ) if (dano[player] == 1) then if (pickupType == 0) or (pickupType == 1) then outputChatBox("Não é possivel pegar pickup em combate!",player, 255, 0, 0) cancelEvent() end end end addEventHandler("onPickupHit", root, clientPickupHit) error: table index is nil thx for help, i finished.
  3. this script should work: when the player receives damage, stay blocked from picking up pickups for 8 seconds, after that, it is possible. however, after the player takes damage and receives "dano = 1", it is still possible to get the pickup as if the cancelEvent () was not there. it only works on the severside, changing events to the server, but it block all players pickups... what's wrong?
  4. Hello, sorry for bothering you again. I want to change this code so that I call the ID instead of its name, note that in line 1 another code is called "game_id2" in which he define the ID, I want to replace the / checkbinds playername with / checkbinds playerID example: /checkbinds 2 Code: I know it's not allowed to ask to edit scripts, if you can't, guide me on how to do this. Thanks.
  5. not work Serverside: Clientside: the player still takes damage after teleporting
  6. Thanks very much. When the player receives damage wait 5 seconds to pickup health / armor how i put it ? if (getPickupType(pickup) == 1) then -- If it's an armour pickup cancelEvent() -- Cancel the event outputChatBox("Wait 5 seconds for pickups.", source, 255, 0, 0)
  7. bad argument #1 to 'pairs' (table expected, got nil)
  8. Thanks bro, but i have another error. Code:
  9. Okay, but it's spamming the messages: outputChatBox ( "Aguarde ".. (CommandSpam [ source ] and math.floor ( getTimerDetails ( CommandSpam [ source ] ) / 1000 ) or 5 ) .." segundos para se teleportar novamente!", source) and outputuhatBox ( "it is not possibl e to teleport in c omb at" , source , 255 , 0 , 0 , true ) ... on all kinds of commands I type, not just teleports.
  10. How to put "it is not possible to teleport in combat" while the player tries to teleport?
  11. Code: teleportes = { {"condominio", 2212.9479980469, 218.67300415039, 492.70068359375,"Foi para o Condominio"}, {"rampa4",-681.61298, -331.70407, 1065.12817,"Foi para a Rampa #4"}, {"rampa5",1580.10986, 1016.11517, 1336.80627,"Foi para a Rampa #5"}, {"batebate",-1416.758666992, 988.67651367188, 1024.0202636719,"Foi para a Pista de Bate-Bate"}, {"rally",-1435.75, -652.66406, 1054.9375,"Foi para a Pista de Rally"}, {"barco",-2303.12183, 1557.78577, 1.56776,"Foi para o Barco"}, {"racha",-4065.4763184594, -854.5, 454.79611206055,"Foi para a Pista de Racha"}, } --- your code local timeEffect = 10000 addEventHandler("onClientPlayerDamage", root, function() if ( getElementData( source, "antiEscape" ) == false ) then setElementData( source, "antiEscape", true ) setTimer( setElementData, timeEffect, 1, source, "antiEscape", false ) end end ) ---- local commandSpam = {} local playertag = getElementData(player,"gang.tag") or "" function pCommandSpam(comando) for k,v in pairs(teleportes) do if getElementDimension(source) == 0 then if getElementInterior(source) == 0 then if ( getElementData( source, "antiEscape" ) == false ) then -- here if comando == v[1] then if (not commandSpam[source]) then local veh = getPedOccupiedVehicle(source) setElementPosition ( source, v[2], v[3], v[4] ) if (veh) then setElementPosition ( veh, v[2], v[3], v[4] ) end if(v[5])then exports["killmessages2"]:outputMessage ( "#ffffff" ..playertag.. "".. getPlayerName(source) .."#ffffff(ID:" .. (getPlayerID(source) or "???") .. ")#AC0000 Foi Para "..v[5].." #ffffff(/" ..v[1].. ") ", root, 0, 255, 0, true ) outputChatBox( "#AC0000[TELE] #ffffff" ..playertag.. "".. getPlayerName(source) .."(ID:" .. (getPlayerID(source) or "???") .. ")#c4c4c4 você foi para /" ..v[1].. "", source, 0, 255, 0, true ) else outputChatBox("You can't escape !" ) -- here end end commandSpam[source] = 1 elseif (commandSpam[source] == 1) then cancelEvent() outputChatBox ( "Aguarde 5 segundos para se teleportar novamente!", source) else commandSpam[source] = commandSpam[source] + 1 end break end end end end end addEventHandler("onPlayerCommand", root, pCommandSpam) setTimer(function() commandSpam = {} end, 5000, 0) --- ignore function getPlayerFromID(id) return call(getResourceFromName("game_id2"), "getPlayerFromID", tonumber(id)) end function getPlayerID(player) return getElementData(player,"id") end Error:
  12. Hello, I am trying to create a script where the player can not use a certain command when it receives damage. For example: "It is not possible to teleport in combat!" If a player receives damage, it is necessary to wait 10 seconds to be able to use life pickups and teleport. Thanks;
  13. Yes i tried to make in client side and server side but dont work, how?
×
×
  • Create New...