How Can I Unaffected By The Explosion
#1

Hi,

As I said at the title, I want to my health will not decrease on any explosions. Is it possiple?
Reply
#2

Setting your health to 99999.
Reply
#3

Depends on what explosion you use.

https://sampwiki.blast.hk/wiki/CreateExplosion
https://sampwiki.blast.hk/wiki/Explosion_List

If you're talking about explosions in general, you need to set your vehicle health very high or to infinite using SetPlayerHealth.
Reply
#4

Quote:
Originally Posted by BenzoAMG
Посмотреть сообщение
set your vehicle health very high or to infinite using SetPlayerHealth.
Sir, no sir
Reply
#5

No. I mean health will discrease on fall, shoot, fight etc.. It will not discrease only explosions.
Reply
#6

Looking at the explosions list, type 1 does no physical blast and is visible, type 13 isn't visible, no physical blast, "Produces no special effects other than black burn effects on the ground, does no damage either."
Hope I helped.
Reply
#7

Quote:
Originally Posted by JimmyCh
Посмотреть сообщение
Looking at the explosions list, type 1 does no physical blast and is visible, type 13 isn't visible, no physical blast, "Produces no special effects other than black burn effects on the ground, does no damage either."
Hope I helped.
On rocket or greande explosions? And only one person will unaffected. Others will die
Reply
#8

Oops, not sure where I got 'Vehicle Health' from...
You cannot exactly alter an explosion from a weapon, but this is something that should help...

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
    switch(weaponid)
    {
        case 16, 35, 36, 39, 40, 51:
        {
            new Float:health;
            GetPlayerHealth(playerid, health);
            SetPlayerHealth(playerid, (health + amount));
        }
    }
    return 1;
}
This will work depending on the lagg between the server and the client. Hopefully many people won't die from excess explosions. I'm pretty sure this would work, I haven't exactly experimented with it.
Reply
#9

You can use this include : https://sampforum.blast.hk/showthread.php?pid=1068550#pid1068550
It does create explosion for one guy
so your code will be like this:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
      if(playerid != i)
      {
            CreateExplosionEx(i, Float:x, Float:y, Float:z, Float:radius, Float:maxdamage, type=EXPLOSION_TYPE_MEDIUM, reason=51, playsound=true)
      }
}
Reply
#10

Quote:
Originally Posted by DeMoX
Посмотреть сообщение
You can use this include : https://sampforum.blast.hk/showthread.php?pid=1068550#pid1068550
It does create explosion for one guy
so your code will be like this:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
      if(playerid != i)
      {
            CreateExplosionEx(i, Float:x, Float:y, Float:z, Float:radius, Float:maxdamage, type=EXPLOSION_TYPE_MEDIUM, reason=51, playsound=true)
      }
}
Thank you it's useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)