PDA

View Full Version : [Functions] GivePlayerHealth & GivePlayerArmour & GivePlayerScore


aircombat
29/05/2010, 02:56 PM
Here is a little tutorial about those 3 functions in the title , i know most people out there will just say its useless , but it's not for beginners

1.GivePlayerHealth :
Add anywhere in the script (Not in a callback)


stock GivePlayerHealth(playerid,Float:Health)
{
new Float:health; GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health+Health);
}


2.GivePlayerArmour :
Add anywhere in the script (Not in a callback)


stock GivePlayerArmour(playerid,Float:Armour)
{
new Float:armour; GetPlayerHealth(playerid,armour);
SetPlayerArmour(playerid,armour+Armour);
}


3.GivePlayerScore :
Add anywhere in the script (Not in a callback)


stock GivePlayerScore(playerid,Score)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+S core);
}

-------------------------------------------------------------------------------------------------------------------
Special Thanks To ViruZZzZ_ChiLLL For Testing The Codes ( I'm Not Home Atm :D )

WackoX
29/05/2010, 03:00 PM
Put it in the useful functions list, this isn't a FS nor an Include.
And also please learn some identation.

aircombat
29/05/2010, 03:06 PM
No i ain't putting it anywhere lol , its here except an admin move it , and no offense but its my code and i like it like that

[TF]Death_Ghost
24/06/2011, 04:13 PM
Good Work, but i think the GivePlayerScore it's:

stock GivePlayerScore(playerid,Float:Score)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+S core);
}

Mauzen
24/06/2011, 05:09 PM
No, the score isnt tagged as float, it is just an integer.
BTW there was no need to bump still, again im wondering how you even found that.

Treyfus
27/04/2012, 02:25 PM
Well I do not speak English but you are reading this was translated by ****** translator.

and well I wanted to in section desir Spanish, published a post called an include GPH and that it ise me if they want to download and view mirenlon dowload.

here the link:

http://forum.sa-mp.com/showthread.php?t=337673

doreto
27/04/2012, 02:43 PM
why i will make stock for GivePlayerHealth,GivePlayerArmor than i can use SetPlayerHealth, SetPlayerArmor, ?

Treyfus
28/04/2012, 02:13 PM
http://1.bp.blogspot.com/-Ng3gPJfZJDk/TeVhOHQxjWI/AAAAAAAAAKw/JaxL8kX7ZDo/s1600/no-entiendo.jpg

ElMelo
11/04/2013, 02:02 AM
I like it, Good Job men :)