PAWNO Script Help
#1

You know the script GetPlayerHealth right? The script should be like this:
pawn Код:
GetPlayerHealth(playerid, Float:health);
Isn't that right? But the problem is, as you know, PAWNO added somekind of help tooltip to make us easier to make script. But, when i check into GetPlayerHealth function in PAWNO, the tooltip says:

[PAWN]GetPlayerHealth(playerid);[PAWN]

First of all, i think the Float:health are optional, so i didn't use it. And i found on compile, PAWNO told me an error message that the GetPlayerHealth function is wrong, there should be more thing there...

Hope anyone knows about this bug also...
Reply
#2

No. Also you're in the wrong section.

GetPlayerHealth(playerid, &health)
playerid - The player you would like to store the health float to.
&health - The float you wan't store the health float to.

So you will use it like this.
pawn Код:
public OnPlayerSpawn(playerid) {
  new Float:Health; // Storing this variable!
  new string[23];
  GetPlayerHealth(playerid, Health);
  format(string, sizeof(string), "Your health is %0.2f!", Health);
  SendClientMessage(playerid, 0x330066AA, string);
  return 1;
}
Reply
#3

You could create your own function or just re-define it.

pawn Код:
stock GetPlayerHealthEx(playerid)
{
  new Float:health;
  GetPlayerHealth(playerid, health);
  return health;
}
Reply
#4

He's saying the tooltip is wrong in Pawno, and I have seen this too.



That's what he means, it doesn't show "playerid, &health"
Reply
#5

example :

Код:
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health+30);
Reply
#6

Yes Etch we know, but what he is saying is that there is a bug with the tooltip, he is not asking for help with it or asking how to use it.
Reply
#7

Quote:
Originally Posted by biltong
Yes Etch we know, but what he is saying is that there is a bug with the tooltip, he is not asking for help with it or asking how to use it.
k srry
Reply
#8

Quote:
Originally Posted by aircombat
Посмотреть сообщение
example :

Код:
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health+30);
Player001 (health 100)

for example the player has 40 health and there's a script to operate that.

SetPlayerHealth 40 + 40+30.

Same as the money..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)