[AJUDA] Escudo
#2

pawn Код:
#define MAX_DANO (20)

new Float:Health[MAX_PLAYERS], Tiros[MAX_PLAYERS];

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid){
    if(IsPlayerAttachedObjectSlotUsed(playerid, 3)){
        GetPlayerHealth(playerid, Health[playerid]);
        if(Tiros[playerid] < MAX_DANO) ++Tiros[playerid], SetPlayerHealth(playerid, Health[playerid]);
        else if(Tiros[playerid] > MAX_DANO) Tiros[playerid] = 0, RemovePlayerAttachedObject(playerid, 3);
    }
    return true;
}
Nгo testei, mas acho que funciona pela lуgica.
Reply


Messages In This Thread
[AJUDA] Escudo - by leosivi - 18.05.2012, 19:44
Re: [AJUDA] Escudo - by Abravanel - 18.05.2012, 20:39
Re: [AJUDA] Escudo - by leosivi - 18.05.2012, 20:56
Re: [AJUDA] Escudo - by Abravanel - 18.05.2012, 21:16
Re: [AJUDA] Escudo - by leosivi - 19.05.2012, 01:27

Forum Jump:


Users browsing this thread: 1 Guest(s)