20.09.2011, 20:18
i need help with include onplayershotonplayer how i can make other player not lose anything from his health ??!!! how please help! i realy want that
i need help with include onplayershotonplayer how i can make other player not lose anything from his health ??!!! how please help! i realy want that
|
PublicOnPlayer/......
{
SetPlayerhHealth(target, 100);
}
forward OnPlayerShotPlayer(playerid);//somewhere on the script
new HealthTimer;//at the top of the script
HealthTimer = SetTimerEx("OnPlayerShotPlayer", 1000, true, "i", playerid);//in onplayerconnect
KillTimer(HealthTimer);//in onplayerdisconnect
public OnPlayerShotPlayer(playerid)//somewhere on the script
{
new Float:Health;
GetPlayerHealth(playerid, Health);
if(Health < 950)
{
SetPlayerHealth(playerid, 100);
}
return 1;
}