Question
#1

Hello so i made a stock but i cant figure out how to make it work it gives me warnings such as "not matches defenistion"

how can i make my stock decrease health every second like in variables for exsample Time[playerid] --;

how do i do this with stocks?


here is my stock
pawn Код:
stock DecreaseHealth(playerid)
{
   SetPlayerHealth(playerid, GetPlayerHealth(playerid) --);
}
Reply
#2

why don't use timer ?
Reply
#3

i use variables as timers
the problem is i dont know how to make someones health to decrease within a stock if its even possible
and can i use variables as timers to decrease health every second?
Reply
#4

pawn Код:
stock DecreaseHealth(playerid)
{
    new
        Float: health
    ;
    GetPlayerHealth(playerid, health);
    return SetPlayerHealth(playerid, health - 1.0);
}
Reply
#5

@Dark, you've got GetPlayerHealth messed up.

pawn Код:
stock DecreaseHealth(playerid)
{
   new Float:health;
   GetPlayerHealth(playerid, health);
   return SetPlayerHealth(playerid, health-1.0);
}
Reply
#6

Thanks for the help man it worked +1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)