#1

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
Reply
#2

You have to store the player health. When the player get damage you must restore his health.
Reply
#3

Quote:
Originally Posted by [MKD]Max
Посмотреть сообщение
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
Have you seen this:

https://sampforum.blast.hk/showthread.php?pid=937824#pid937824

Found with a little SEARCH. Should help you get started.
Reply
#4

You simply can reset players health every 1 sec to 999999hp
Or if you want make it like if players are same team than they cant shot each other than use SetPlayerTeam
Reply
#5

pawn Код:
PublicOnPlayer/......
{
      SetPlayerhHealth(target, 100);
}
What exactly do ou mean...
Reply
#6

pawn Код:
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;
}

this will set his health to 100 every 1 sec if his heal is lower than 950hp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)