Jump to content

question about window


Chaos

Recommended Posts

Posted

Yes, you can also use that to disable it.

The zombies can still hurt you because the zombies script uses setElementHealth, and "onClientPlayerDamage" doesn't cancel that.

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

Well, you can set the player health when he gets damaged.

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

function stopDamage ( )   

 addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage )

end

function stopMinigunDamage()

player = getLocalPlayer()

setElementHealth (player,getElementHealth (player) +25)

end

I think you mean that is that correct and if correct is there a shortcut?

Posted

I think that the functions must be created before, try this: (stopDamage function is not eeeded!)

--addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) 
function stopMinigunDamage() 
health = getElementHealth(localPlayer) 
setElementHealth (localPlayer, health +25) 
end 
addEventHandler ( "onClientPlayerDamage", getRootElement(), stopMinigunDamage ) 

Posted

It is needed, because he wants to add the event when he presses a key, you should read the entire topic before reply, don't take it the wrong way.

@Chaos: That should work, yes.

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
function stopDamage ( )    
 addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) 
addEventHandler("onClientPlayerStealthKill", getLocalPlayer(), stopMinigunDamage ) 
end 
  
function stopMinigunDamage() 
player = getLocalPlayer() 
setElementHealth (player,getElementHealth (player) +100) 
cancelEvent () 
end 

correct?

Posted

You can try that, not sure if it'll work though.

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

Maybe it's a custom stealth kill made by the zombies script, so, you'll have to edit the zombies script itself.

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

i'm plan to make a marker is that possible?

  
    addEvent ( "test", true ) 
    addEventHandler ( "test", getRootElement(), 
    function( )   
      local x, y, z = getElementPosition ( source ) 
      local theMarker = createMarker ( x , y , z, "cylinder", 2, 0, 0, 0, 0 ) 
   addEventHandler( "onMarkerHit", theMarker, antizombies ) 
    end) 
      
    function antizombies(h) 
    if not isElement(h) then return end 
    if getElementData(h,"zombie") then killPed(h) end  
    end 
  
  

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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