Jump to content

Making a ped immortal and freezing it


Recommended Posts

Posted

So I understand that as a beginner scripter I was pushing my self so hard to make detailed and improved scripts and that was the reason why I get stuck all the time so I decided to make a simple hospital script :D . Getin mark get the health, simple logic.

I created a medic for the marker and named it as adriana lima <3 . The problem is I dont want adriana to die or escape from me. I want her to be with me till my server stays online :D .

So in short explanation, how can make a ped immortal and freeze it :D

AdrianaLima = createPed ( 276, 1181.7275390625, -1332.9736328125, 14.581448554993, -90, false ) 

Posted

The example of this is on the createPed page itself.

You will need to use the following code - CLIENT SIDE:

  
function cancelPedDamage() 
    cancelEvent() -- Cancels the onClientPedDamage event 
end 
addEventHandler("onClientPedDamage", AdrianaLima, cancelPedDamage)  
  

Posted

okay thanks it worked. I dont want to open another topic so, how can i hide a DXrectangle and text? Is there anything similiar to guisetvisible function?

Posted
okay thanks it worked. I dont want to open another topic so, how can i hide a DXrectangle and text? Is there anything similiar to guisetvisible function?

You need to remove the event onClientRender.

removeEventHandler 

Posted

Setting alpha I think is a bad way to do it, because the client still has to 'think about' the dx drawings being there, then superimpose the alpha.

It's better to just remove the event handler, as TAPL said.

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...