Salut, je suis entrain de travailler sur un anticheat, et le problème c'est que quand on a plus le gilet, les gens le voient encore.
Merci d'avance
PHP Code:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart){
if(pinfo[playerid][Armure] > 0){
if(weaponid == 0){
pinfo[playerid][Vie] -= amount;
}
else{
pinfo[playerid][Armure] -= amount;
}
}
else if(pinfo[playerid][Vie] > 0){
pinfo[playerid][Vie] -= amount;
}
return 1;
}
PHP Code:
public OnPlayerUpdate(playerid){
SetTimerEx("verifvie", 500, false, "i", playerid);
PHP Code:
forward verifvie(playerid);
public verifvie(playerid)
{
new Float:vie;
GetPlayerHealth(playerid, vie);
if(vie != pinfo[playerid][Vie]){
SetHealth(playerid, pinfo[playerid][Vie]);
}
return 1;
}
PHP Code:
stock SetHealth(playerid, Float: health)
{
pinfo[playerid][Vie] = health;
SetPlayerHealth(playerid, health);
}
Aucun commentaire:
Enregistrer un commentaire