Bei Gamemodeinit
SetTimerEx("HP", 1000, false, "i", playerid);
SetTimerEx("AP", 1000, false, "i", playerid);
OnPlayerTakeDamage
if(GetPlayerArmour(playerid) > 0.0)
SetTimerEx("AP", 1000, false, "i", playerid);
SetPlayerAttachedObject(playerid,1,1242,17,0.601999,-0.036000,0.011000,96.299972,79.500015,-81.599990,1.000000,1.000000,1.000000);
if(GetPlayerHealth(playerid) > 0.0)
{
SetTimerEx("HP", 1000, false, "i", playerid);
SetPlayerAttachedObject(playerid,2,1240,17,0.587000,-0.027000,0.028000,86.100051,79.499977,-69.599990,1.000000,1.000000,1.000000);
Dann irgendwo unten
forward HP(playerid);
public HP(playerid)
{
RemovePlayerAttachedObject(playerid, 1);
}
forward AP(playerid);
public AP(playerid)
{
RemovePlayerAttachedObject(playerid, 2);
}