Jump to content

ronaldoguedess

Members
  • Posts

    77
  • Joined

  • Last visited

Everything posted by ronaldoguedess

  1. has as by a delay between each shot? I saw on a server, this system The targeted player, and when you turn the ball mouse, he chooses between automatic and semi-automatic!
  2. Hello my friends, I would leave my M4 weapon with the option of being Semi-Automatic .. where to start? Delay or setWeaponProperty?
  3. I wonder if I have to save some data in another file of the account without the internal.db? Hugs
  4. PEDs comes running behind me, attack me, and emit sound ... to be honest need at least a 15 per player PEDS.
  5. I'm working on a project zombie. And with 6 zombies, already appear lags. There is a limit of PED's (zombies)? Hugs
  6. Does it have something wrong? I Can not Get the "Source" and not the "targetPlayer". Client _________________________________ function onStealthKill(source, targetPlayer) triggerServerEvent("onPedGetsKilledStealthKill", source, targetPlayer) end addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), onStealthKill) Server ___________________________________ function PedKilledgggg(source, targetPlayer) if source then setElementData(source, "Pedkilled", getElementData(source, "Pedkilled") + 1) end end addEvent("onPedGetsKilledStealthKill", true) addEventHandler("onPedGetsKilledStealthKill", getRootElement(), PedKilledgggg) Hugs
  7. Good Night!! I wonder if there is a function to "Identifying hit with the car" in the PED. Hugs.
  8. yes, but in my ta the contrary. The Source this being the "PED" who was killed! Is there another way I can get my player?
  9. I got it! Thank you! However, something went wrong and I can not identify the player who gave the knife. The "Source" is PED And I do not know what I am. if killer then pedsalive = pedsalive - 1 setElementData(killer, "pedskilled", getElementData(killer, "pedskilled") + 1) end I can not receive data from the player that the attack took place. tried and "thePlayer" and "Player". Solution?
  10. Thank you! I tried to use this example file on the server and did not return anything. PED killed and nothing happened. function onStealthKill(source) outputChatBox("Stealth kill!", source) end addEventHandler("onPlayerStealthKill", getRootElement(), onStealthKill)
  11. I would like to know how to identify that attack the player sticks his knife in the ped, wanted to create a function, but how to identify it? é uma dessas animações: setPedAnimation ( source, "knife", "KILL_Knife_Player", -1, false, false, true) setPedAnimation ( ptarget, "knife", "KILL_Knife_Ped_Damage", -1, false, false, true)
  12. No words to thank you, gave just right. I swear I had already tried with the source. Thank you!
  13. yeah, I do not know what the correct function to use to get the PED already done. local ped = getElementModel (source)
  14. Good evening, I'm having trouble at line 12 of my code. you guys should be simple thing, I can not merge the elements using pedcol and ped, the problem is that because of the ped that is created in another function, has somehow I use the ped that was created in another function and use attachElements to join the "ColSphere" and the "PED"? tried using getElementModel (source), and the getElementData (source) and neither worked! Error on line 15 "but it's on the line 12; :15 : Bad arguments @ attachElements' [Expected element at argument 2, got number '68'] function createPedForPlayer(x, y, z) local ped = createPed ( 3 ,x, y,z) end setTimer(createPedForPlayer, 3000, 0) function pedKilled(killer, headshot, attacker, attackerweapon, bodypart, loss ) local ped = getElementModel(source) local pedCol = createColSphere(x, y, z, 1.5) attachElements(pedCol, ped, 0, 0, 0) end addEvent("onPedGetsKilled", true) addEventHandler("onPedGetsKilled", getRootElement(), pedKilled)
  15. Thank you very ... Thank you very much! I'm new to mta, I am learning slowly.
  16. How do to Remove triangle of life above the head of the PED? Can someone help me? hugs...
  17. In the original script has no error, which is a simplification made ​​to understand better, but I ended up erring. hehe Thanks for correcting! Thank TAPL, worked perfectly. I did not know you could by a "addEvent" inside a function! I came across another problem! The problem is that I can not delete the (pedCol) we use the function "createZombiePlayer". Is there any way I can delete it when the ped is killed using the "onPedWasted"? NOTE: This Code is in the same "file server" what has been fixed! function deanimated( ammo, attacker, weapon, bodypart ) if (getElementData (source, "zombie") == true) then zombiesalive = zombiesalive - 1 outputChatBox ( "Zombi Died!", player, 0, 238, 0, true ) setElementData ( source, "status", "dead" ) destroyElement(pedCol) -- BUG end end addEventHandler("onPedWasted", getRootElement(), deanimated) ERROR CONSOLE: Bad argument @ ´destroyElement´ [Expected element at argument 1, got nil]
  18. I have a problem and can not find the solution, I have a client that calls SetTimer in this function server side. The "createZombiePlayer" creates the zombie! But I can not get the variable collision (pedCol), I used the above function! Simplified the code to better understand! function createZombiePlayer(x, y, z) local zombie = createPed ( 70 ),x, y,z, math.random(0, 360)) local Zx, Zy, Zz = getElementPosition( zombie ) local pedCol = createColSphere(Zx, Zy, Zz, 1.5) attachElements(pedCol, zombie, 0, 0, 0) end addEvent("createZombiePlayer", true) addEventHandler("createZomieForPlayer", getRootElement(), createZombiePlayer) function hitCol (player) outputChatBox ( "Hit", player, 255, 255, 0, true ) end addEventHandler("onColShapeHit", pedCol, hitCol) The error is on the line 6 of function "hitCol" ERROR CONSOLE: Bad argument @ ´addEventHandler´ [Expected element at argument 2, got nil] Is there any way I can get the value of (Variable pedCol) I used the above function? NOTE: The two functions in this same file!
  19. ronaldoguedess

    MTA V?

    Bring on the Mta for GTA V.
  20. Thank you friend, it really was! However the only way I could get was this: addEventHandler("onResourceStart",resourceRoot, function ( ) setWeaponProperty(23, "pro", "damage", 100) end ) Would you like something more professional using tables, can you help me? I made a small table with the damage of weapons. damageTable = { {"M4",100}, {"AK-47",80}, {"Shotgun",100}, {"Silencied",10} } However, I do not know further if you can help me with some example will be grateful. This is the script that subtract the value of getElementHealth setElementHealth ( source, ( getElementHealth (source) - 100) ) Gostaria de pegar o valor do dano da arma, pela tabela e descontar nesse script acima. have any examples or explanation? Thanks to All!
  21. In short, in theory I would have to give 10 Hit Zombie for him to die .. But he dies with 3 shots, and the dummy falls, and even programmed it. Helpp. SERVER FILE: local zumb = createPed (37, -1993.5111083984,102.96244049072,27.5390625) setElementHealth (zumb, 200) setElementData(zumb, "status", true) local playerHealth = getElementHealth ( zumb ) tt = setTimer(function() if getElementHealth(zumb) <= 0 then outputChatBox ( "Zumbi Died", theplayer, 255, 0, 0 ) setElementData(zumb, "status", false) end end, 1000, 0) Client File: function zombiedamaged ( attacker, weapon, bodypart, loss ) if getElementType ( source ) == "ped" then --if (getElementData (source, "zumb") == true) then if ( bodypart == 9 ) then if (weapon == 25) or (weapon == 26) or (weapon == 27) then outputChatBox ( "head Shot", 255, 0, 0 ) setPedHeadless(source, true) setPedAnimation ( source, "PED" , "HitA_1", -1,false ) setElementHealth ( source, ( getElementHealth (source) - 10 ) ) end end end --end end addEventHandler ( "onClientPedDamage", getRootElement(), zombiedamaged )
  22. Exactly Hypex. Thank you. however, I am having some incompatibility. My PED has created reactions and life itself now until the data varies with the gun, and I do not programmed any of that yet. What do I do? Does the GAMEMOD Play? ? I'm trying to learn the system of HP first, then I'll learn this. thank you!
×
×
  • Create New...