How to give damage?
#3

Use SetPlayerHealth to set a player's health, if you wan't to apply damage, use GetPlayerHealth.
pawn Код:
new Float:health; // Creates a float called "health"
GetPlayerHealth(playerid, health); // Stores the player's health in the float "health"
SetPlayerHealth(playerid, health - 90); // Sets the player's health to the float "health" - 90
There are several callbacks where you can detect if the player damages another player, like OnPlayerTakeDamage and OnPlayerGiveDamage.
Reply


Messages In This Thread
How to give damage? - by Nabster - 21.02.2015, 12:22
Re: How to give damage? - by davve95 - 21.02.2015, 12:33
Re: How to give damage? - by CalvinC - 21.02.2015, 12:48
Re: How to give damage? - by JaydenJason - 21.02.2015, 12:58
Re: How to give damage? - by CalvinC - 21.02.2015, 13:09
Re: How to give damage? - by Antoniohl - 21.02.2015, 13:11
Re: How to give damage? - by Nabster - 21.02.2015, 13:31

Forum Jump:


Users browsing this thread: 1 Guest(s)