Modifying weapon damage?
#7

Quote:
Originally Posted by wups
Посмотреть сообщение
pawn Код:
public OnPlayerShootPlayer(shooter,target,Float:damage)
{
    new Float:H[2];
    GetPlayerHealth(target, H[0]);
    GetPlayerArmour(target,H[1]);
    if(GetPlayerWeapon(shooter) == 34)
    {
        if(H[1] > 0) return SetPlayerArmour(target,0);
        SetPlayerHealth(target, H[0]-100);
    }
    return 1;
}
EDIT: Oh i was late But my code is different.
Yours is better. I'm not good with thinking 1-2-3. I need to write it on notepad.
I've just done that. This is my result:

Код:
100 A
80 H

A: 100 - 80 (= 20)
H: 100 - A = 100 - 20 = 80

Armour = 20
Health = 80
it looks like this: You have 100 armour and 80 health.
You get shot by ANY weapon (forget GetPlayerWeapon). It will do :
Armour = 100-80
Health = 100 - "Armour" (100-80) - 100 - 20
So armour will be 20 and health 80 now. (actually, it's a bit RP. In real, your armour won't gone first , then health)
And like I said, I forgot the GetPlayerWeapon

Use Wups code
Reply


Messages In This Thread
Modifying weapon damage? - by Zack9764 - 08.01.2011, 12:24
Re: Modifying weapon damage? - by Kwarde - 08.01.2011, 12:29
Re: Modifying weapon damage? - by wups - 08.01.2011, 12:31
Re: Modifying weapon damage? - by Zack9764 - 08.01.2011, 12:44
Re: Modifying weapon damage? - by Kwarde - 08.01.2011, 13:44
Re: Modifying weapon damage? - by wups - 08.01.2011, 13:45
Re: Modifying weapon damage? - by Kwarde - 08.01.2011, 13:50
Re: Modifying weapon damage? - by Zack9764 - 08.01.2011, 14:01
Re: Modifying weapon damage? - by Kwarde - 08.01.2011, 14:03
Re: Modifying weapon damage? - by Zack9764 - 08.01.2011, 14:05

Forum Jump:


Users browsing this thread: 3 Guest(s)