PAWNO Script Help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: PAWNO Script Help (
/showthread.php?tid=137231)
PAWNO Script Help -
VirSpectorX - 28.03.2010
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...
Re: PAWNO Script Help -
Carlton - 28.03.2010
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;
}
Re: PAWNO Script Help -
[HiC]TheKiller - 28.03.2010
You could create your own function or just re-define it.
pawn Код:
stock GetPlayerHealthEx(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
return health;
}
Re: PAWNO Script Help -
biltong - 29.03.2010
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"
Re: PAWNO Script Help -
aircombat - 29.03.2010
example :
Код:
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health+30);
Re: PAWNO Script Help -
biltong - 29.03.2010
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.
Re: PAWNO Script Help -
aircombat - 29.03.2010
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
Re: PAWNO Script Help -
Seven_of_Nine - 11.04.2011
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..