[HELP] Energy - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Energy (
/showthread.php?tid=109408)
[HELP] Energy -
Sayels - 20.11.2009
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
Re: [HELP] Stamina -
Sayels - 20.11.2009
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];
Re: [HELP] Energy -
Sayels - 20.11.2009
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];
|
Re: [HELP] Energy -
Abernethy - 20.11.2009
SetTimerEx?
Energy[playerid] + Energy[playerid]-10;
Re: [HELP] Energy -
Sayels - 20.11.2009
I know, but how to combine to make it work
Re: [HELP] Energy -
ExoSanty - 20.11.2009
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...
}
Re: [HELP] Energy -
Sayels - 20.11.2009
Here you explained Timer, but did not explain me how it fills the power -10 .

.. But, but thanks
Re: [HELP] Energy -
ExoSanty - 21.11.2009
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?
Re: [HELP] Energy -
Sayels - 21.11.2009
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
Re: [HELP] Energy -
ExoSanty - 21.11.2009
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