[Pedido] SetPlayerHealth gradualmente - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] SetPlayerHealth gradualmente (
/showthread.php?tid=413939)
SetPlayerHealth gradualmente -
Gustavo Aguiar - 07.02.2013
Jб procurei bastante e nгo achei... eu queria que invйs de setar a vida do player de uma sу vez: SetPlayerHealth(playerid,100.0); setasse gradualmente, aos poucos com o passar do tempo tipo: seta +10 health a cada 1 segundo...
Re: SetPlayerHealth gradualmente -
@Riichard - 07.02.2013
SetTimer/Ex + Variaveis + GetPlayerHealth + SetPlayerHealth
Re: SetPlayerHealth gradualmente -
DanDRT - 07.02.2013
Espero que dк certo.
New...
Setando o Life do Player e +10.
PHP код:
GetPlayerHealth(playerid, HP);
SetPlayerHealth(playerid, HP+10);
Re: SetPlayerHealth gradualmente -
zSuYaNw - 07.02.2013
Isso,
pawn Код:
healtPlayer(); public healtPlayer(){
static Float: pHealth[ MAX_PLAYERS ];
static Int, MaxP;
for(Int = 0, MaxP = GetMaxPlayers(); Int != MaxP; ++Int){
if(IsPlayerConnected(Int)){
GetPlayerHealth(Int, pHealth[Int]);
if(pHealth[Int] < 100){
SetPlayerHealth(Int, 5.0);
}
}
}
return true;
}
Re: SetPlayerHealth gradualmente -
MatheusFuria - 07.02.2013
Quote:
Originally Posted by @Riichard
SetTimer/Ex + Variaveis + GetPlayerHealth + SetPlayerHealth
|
Darб certo
Re: SetPlayerHealth gradualmente -
Schocc - 07.02.2013
Sу usar um
SetTimerEx na funзao do gafield
Re: SetPlayerHealth gradualmente -
Gustavo Aguiar - 08.02.2013
Consegui fazer aki com o cуdigo do garfield com umas alteraзхes e um SetTimerEx...Obrigado a todos que responderam!