[Functions] GivePlayerHealth & GivePlayerArmour & GivePlayerScore
#1

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)

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

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

pawn Код:
stock GivePlayerScore(playerid,Score)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+Score);
}
-------------------------------------------------------------------------------------------------------------------
Special Thanks To ViruZZzZ_ChiLLL For Testing The Codes ( I'm Not Home Atm )
Reply
#2

Put it in the useful functions list, this isn't a FS nor an Include.
And also please learn some identation.
Reply
#3

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

Good Work, but i think the GivePlayerScore it's:

pawn Код:
stock GivePlayerScore(playerid,Float:Score)
{
    SetPlayerScore(playerid,GetPlayerScore(playerid)+Score);
}
Reply
#5

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.
Reply
#6

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:

https://sampforum.blast.hk/showthread.php?tid=337673
Reply
#7

why i will make stock for GivePlayerHealth,GivePlayerArmor than i can use SetPlayerHealth, SetPlayerArmor, ?
Reply
#8

Reply
#9

I like it, Good Job men
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)