-
Posts
77 -
Joined
-
Last visited
Everything posted by ronaldoguedess
-
Transforming Weapon M4 Semi Automatic?
ronaldoguedess replied to ronaldoguedess's topic in Scripting
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! -
Hello my friends, I would leave my M4 weapon with the option of being Semi-Automatic .. where to start? Delay or setWeaponProperty?
-
Save player data in another file? internal2.db?
ronaldoguedess replied to ronaldoguedess's topic in Scripting
but I like to keep my data in a "SPECIFIC FILE" -
I wonder if I have to save some data in another file of the account without the internal.db? Hugs
-
What is the limit of peds on the server to not have LAG?
ronaldoguedess replied to ronaldoguedess's topic in Scripting
then functions clientside works best? -
What is the limit of peds on the server to not have LAG?
ronaldoguedess replied to ronaldoguedess's topic in Scripting
PEDs comes running behind me, attack me, and emit sound ... to be honest need at least a 15 per player PEDS. -
I'm working on a project zombie. And with 6 zombies, already appear lags. There is a limit of PED's (zombies)? Hugs
-
Identify Mortal Strike with knife in "KILL_Knife_Player"
ronaldoguedess replied to ronaldoguedess's topic in Scripting
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 -
Good Night!! I wonder if there is a function to "Identifying hit with the car" in the PED. Hugs.
-
Identify Mortal Strike with knife in "KILL_Knife_Player"
ronaldoguedess replied to ronaldoguedess's topic in Scripting
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? -
Identify Mortal Strike with knife in "KILL_Knife_Player"
ronaldoguedess replied to ronaldoguedess's topic in Scripting
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? -
Identify Mortal Strike with knife in "KILL_Knife_Player"
ronaldoguedess replied to ronaldoguedess's topic in Scripting
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) -
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)
-
AttachElements use in another function! Error!
ronaldoguedess replied to ronaldoguedess's topic in Scripting
No words to thank you, gave just right. I swear I had already tried with the source. Thank you! -
AttachElements use in another function! Error!
ronaldoguedess replied to ronaldoguedess's topic in Scripting
yeah, I do not know what the correct function to use to get the PED already done. local ped = getElementModel (source) -
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)
-
How Remove the triangle of life above the head of the PED?
ronaldoguedess replied to ronaldoguedess's topic in Scripting
Thank you very ... Thank you very much! I'm new to mta, I am learning slowly. -
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]
-
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!
-
Thank you.: HyPeX,
-
Bring on the Mta for GTA V.
-
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!
-
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 )
-
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!
