Jump to content

[Ayuda] BOSS


Recommended Posts

Posted

Hola bueno quiero que al ser atacado la Humanidad pierda 50 y la vida 50.. pero no pasa.. cual es el error?

Cl

---Matar 1 
function bot ( attacker ) 
local id2 = getElementModel ( slothbot1 ) 
 if attacker == slothbot1 then -- 
  if ( getElementType ( attacker ) == "ped" ) then 
   if (getElementModel(slothbot1) == 35 ) then 
    setElementHealth ( source, getElementHealth(source) - 50 ) 
    humanidad = humanidad - 50   
    
  end 
 end 
end 
addEventHandler("onClientPlayerDamage", getRootElement(), bot) 
  
end 

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

Posted
addEventHandler("onClientPlayerDamage", getRootElement(), bot) 

Tiene que ir despues del ultimo 'end', ademas, 'slothbot1' no esta definido en el server side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Quieres que le quite a todos 50 de vida?

Quiero que el que use el modelo 35 al golpear a una persona le quite 50 de vida

mtasa://66.85.14.178:22003

350x20_FFFFFF_FFFFFF_000000_000000.png

Ts3: thezombiworld.com:7777

350x20_FFFFFF_FFFFFF_000000_000000.png

  • MTA Team
Posted

Seria mas o menos asi:(fijate si anda)

Acordate que de ponerlo en el client-side de el resource de humanidad :wink:

---Matar 1 
function bot ( attacker ) 
local id2 = getElementModel ( attacker ) 
 if (id2 == 35)  then  
    setElementHealth ( localPlayer, getElementHealth(localPlayer) - 50 ) 
    humanidad = humanidad - 50   
    
end 
end 
addEventHandler("onClientPlayerDamage", getRootElement(), bot) 

DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp

 
Posted

Porque no lo haces server side?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...