SA-MP Forums Archive
[Ajuda] Limitar Life/Colete - 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: [Ajuda] Limitar Life/Colete (/showthread.php?tid=420186)



Limitar Life/Colete - JowSmith - 03.03.2013

Alguйm pode me dizer como faz pra limitar o life e colete para 50%?


Re: Limitar Life/Colete - Delete_ - 03.03.2013

SetPlayerHealth(playerid, 50);


Re: Limitar Life/Colete - HumildadeAgain - 03.03.2013

pawn Код:
public OnPlayerUpdate(playerid) {
    new Float: vida , Float: colete;
    GetPlayerHealth(playerid,vida) , GetPlayerArmour(playerid,colete);
    if(vida > 50) SetPlayerHealth(playerid,50);
    if(colete > 50) SetPlayerArmour(playerid,50);
    return 1;
}
Deve ser mais ou menos isso..


Re: Limitar Life/Colete - feliphemort - 04.03.2013

SetPlayerHealth(playerid, 50); // 50 = Vida do player!

Foi como delete disse!