how to create a command that takes 1 HP per sec from a player to another player?
#5

pawn Код:
new Float:phealth,Float:thealth;
GetPlayerHealth(playerid,phealth);
GetPlayerHealth(targetid,thealth);
if((phealth<100)&&(thealth>0))
{
    SetPlayerHealth(playerid,phealth++);
    SetPlayerHealth(targetid,thealth--);
}
This is only an example, i believe you do know how to create a command for this and about getting the targetid and making these codes inside a timer...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)