[Tutorial] Custom Damaging(with bodyparts) && Forbidding Weapons(0.3z)
#6

Quote:
Originally Posted by Unfriendly
Посмотреть сообщение
That's easy to do, though! Especially with what he's already shown us.

Thank you evan!

Код:
     if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 7)
     {
        new Float:phealth;
        GetPlayerHealth(playerid, phealth);
        //if you shoot him in the leg, it should only take like 5 damage...
        // I believe by default the sniper takes like 30, I'm not sure. But if it takes 30 damage you could do this
        SetPlayerHealth(playerid, phealth+25);
       // This just gives the player 25 health when he's shot with a sniper.
       // Keep in mind the sniper took some health, so giving him 25 back won't mean he can't be killed. Just takes more shots in the leg.
     }
By default, sniper rifle takes 42 HP. So you'd need to make allowances. Also, if someone was to shoot you in the leg with a sniper, do you think you would still be moving?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)