SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 28/03/2010, 08:30 AM   #1
VirSpectorX
Big Clucker
 
Join Date: Nov 2009
Posts: 110
Reputation: 0
Default PAWNO Script Help

You know the script GetPlayerHealth right? The script should be like this:
Code:
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...
VirSpectorX is offline  
Old 28/03/2010, 08:44 AM   #2
Carlton
Banned
 
Join Date: Mar 2010
Posts: 720
Reputation: 0
Default Re: PAWNO Script Help

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.
Code:
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;
}
Carlton is offline  
Old 28/03/2010, 08:56 AM   #3
[HiC]TheKiller
High-roller
 
Join Date: Mar 2008
Location: New Zealand
Posts: 3,080
Reputation: 406
Default Re: PAWNO Script Help

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

Code:
stock GetPlayerHealthEx(playerid)
{
  new Float:health;
  GetPlayerHealth(playerid, health);
  return health;
}
__________________
[HiC]TheKiller is offline  
Old 29/03/2010, 12:47 PM   #4
biltong
Gangsta
 
Join Date: Jan 2010
Posts: 550
Reputation: 0
Default Re: PAWNO Script Help

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"
__________________
My releases:
[FS]Admin Click - An admin shortcut script. Lots of commands like kick and ban in a few mouse clicks!
[FS]Vehicle Names - Simple script that displays your vehicle's name whenever you enter one.
[GM]Cops 'n Criminals - An unusual TDM.


Not active anymore, PM me if necessary.
biltong is offline  
Old 29/03/2010, 01:02 PM   #5
aircombat
High-roller
 
Join Date: Feb 2010
Posts: 1,542
Reputation: 9
Default Re: PAWNO Script Help

example :

Code:
new Float:Health;
GetPlayerHealth(playerid,Health);
SetPlayerHealth(playerid,Health+30);
__________________

aircombat is offline  
Old 29/03/2010, 01:33 PM   #6
biltong
Gangsta
 
Join Date: Jan 2010
Posts: 550
Reputation: 0
Default Re: PAWNO Script Help

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.
__________________
My releases:
[FS]Admin Click - An admin shortcut script. Lots of commands like kick and ban in a few mouse clicks!
[FS]Vehicle Names - Simple script that displays your vehicle's name whenever you enter one.
[GM]Cops 'n Criminals - An unusual TDM.


Not active anymore, PM me if necessary.
biltong is offline  
Old 29/03/2010, 01:40 PM   #7
aircombat
High-roller
 
Join Date: Feb 2010
Posts: 1,542
Reputation: 9
Default Re: PAWNO Script Help

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
__________________

aircombat is offline  
Old 11/04/2011, 04:05 PM   #8
Seven_of_Nine
Huge Clucker
 
Seven_of_Nine's Avatar
 
Join Date: Feb 2011
Location: Hungary
Posts: 372
Reputation: 12
Default Re: PAWNO Script Help

Quote:
Originally Posted by aircombat View Post
example :

Code:
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..
Seven_of_Nine is offline  
Old 11/04/2011, 04:20 PM   #9
Y_Less
Spam Machine
 
Y_Less's Avatar
 
Join Date: Jun 2008
Location: 629 - git.io/Y
Posts: 14,537
Reputation: 2817
Default Re: PAWNO Script Help

Quote:
Originally Posted by biltong View Post
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"
It's not wrong, and characterising it as wrong IS wrong. It is just not what you expect - the status bar already lists the full set of parameters, the tooltip lists the NEXT parameter so you can see what to type right now. If you type that parameter and press ',' it will list the next parameter for you.
Y_Less is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Was Pawno script based on php? ReactionGameServers Help Archive 20 22/05/2010 07:25 PM
script to my map in pawno hex575 Help Archive 17 02/02/2010 04:50 PM
Help with pawno script master9808 Help Archive 9 23/11/2009 03:35 PM
Help with Pawno Script Using If Alec24 Help Archive 3 27/02/2009 06:34 PM


All times are GMT. The time now is 10:38 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.