How to give player -400 blood?
#1

Like when player gets shot he looses blood.
Код:
	pInfo[playerid][pBlood];
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(amount >= 25)
    {
    //How do I give player - 400 blood?
    } else return 0;
    return 1;
}
Reply
#2

pInfo[playerid][pBlood] = pInfo[playerid][pBlood]-400 or pInfo[playerid][pBlood] =-400;
Reply
#3

Quote:
Originally Posted by Abagail
Посмотреть сообщение
pInfo[playerid][pBlood] = pInfo[playerid][pBlood]-400 or pInfo[playerid][pBlood] =-400;
Thanx!I thought of it but....
Reply
#4

Actualy it doesn't work it sets it to -400.Not give it -400.
Reply
#5

pawn Код:
pInfo[playerid][pBlood] -= 400;
These are usefull operators:


value = 100; Sets value to 100
value--; subracts 1 from value
value++; adds 1 to value
value -= 100; subtracts 100 from value
value += 100; adds 100 to value
Reply
#6

Quote:
Originally Posted by Schneider
Посмотреть сообщение
pawn Код:
pInfo[playerid][pBlood] -= 400;
Abagail inverted the - and =
Thank you dude.
Reply


Forum Jump:


Users browsing this thread: