[HELP] Energy
#1

Hi all, I would need help from energy.
I do not know what to do, how to do it every 5 minutes reduced the 10 energy ..

I do not know what I'm doing wrong, some timer .. Please help me
Reply
#2

Quote:
Originally Posted by Seif_
You can't reduce stamina.
I guess I wrote it wrong I thought to do their own ..

for example
new energy [MAX_PLAYERS];
Reply
#3

Quote:
Originally Posted by Sayels
Quote:
Originally Posted by Seif_
You can't reduce stamina.
I guess I wrote it wrong I thought to do their own ..

for example
new energy [MAX_PLAYERS];
Reply
#4

SetTimerEx?
Energy[playerid] + Energy[playerid]-10;
Reply
#5

I know, but how to combine to make it work
Reply
#6

Quote:
Originally Posted by Aber
SetTimerEx?
Energy[playerid] + Energy[playerid]-10;
Код:
new EnergyTimer[MAX_PLAYERS];
forward EnergyDecrease(playerid);
then place this when you want the timer to be activated:

Код:
EnergyTimer[playerid] = SetTimerEx("EnergyDecrease", 60000*5, 1,"i",playerid)
60000 is in millisconds so this times 5 is 5 minutes


Код:
stock EnergyDecrease(playerid)
{
  //place the things that need to be done here guess: 
  Energy[playerid] + Energy[playerid]-10; 
  //would do it... if this "Energy" function is correct...
}


Reply
#7

Here you explained Timer, but did not explain me how it fills the power -10 . .. But, but thanks
Reply
#8

Quote:
Originally Posted by Sayels
Here you explained Timer, but did not explain me how it fills the power -10 . .. But, but thanks
i just assumed that this worked: Energy[playerid]
what do you mean with energy/power anyway, the health of a player?
Reply
#9

Quote:

i just assumed that this worked: Energy[playerid]
what do you mean with energy/power anyway, the health of a player?

Yes I would like to make energy, hunger, the need for the toilet and strength.
But I do not know how later
Reply
#10

yeah well, i dont feel like writing that all...
but since you answerd yes, the health can be increased by something like that in the stock:

SetPlayerHealth(playerid) = GetPlayerHealt(playerid)-10;

hunger and such will need more
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)