Jump to content

function to make ped not take damage and...


remaked

Recommended Posts

Posted

I'd like to ask two questions: 

1- How can i make a ped not take damage server sided(so not onClientPedTakeDamage with cancelEvent), it says in wiki that onPlayerDamage with cancelEvent doesn't do that. 

2- If I want my script to be triggered only once a week, is that possibl with setTimer? If not, then I'd like to know how that could be done.

Thanks.

Posted (edited)

Unfortunately, you can't cancel the damage in server-side because it's already done, you could try to heal the ped whenever damaged but it doesn't always work ( e.g: sometimes the ped got 100% damage so R.I.P ).

And yeah you could use setTimer function in your case.

Edited by فاّرس
Posted (edited)

2 - For triggering once a week I highly recommend getRealTime()

1 - Why in server side?

 

Edited by Tekken

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