Sign in to follow this  

Invincible when entering a Colshape

Recommended Posts

Anyone knows how to make the player Invincible/godmode when entering a Colshape?

my code looks like this:

let someColShape = mp.colshapes.newRectangle(-1350, -1435, 10.7, 100);

function playerEnterColshapeHandler(player, shape) {
  if(shape == someColShape) { = 100
	player.removeWeapon(736523883); // SMG
	player.removeWeapon(453432689); // PISTOL
}"playerEnterColshape", playerEnterColshapeHandler);



Share this post

Link to post
Share on other sites

Remembering that the playerEnterColshape event is not a loop, that is, you only call set health 100 once, so he will only leave the player with 100 life when he enters the shape, and then he can suffer damage. Use setInvincible that Xabi has commented on, or you can loop in your, which would not be cool.

Remembering that a correct area for your post would be here

Edited by LeozinH1

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.