SA-MP Forums

Précédent   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Outils de la discussion Modes d'affichage
Vieux 28/03/2010, 08h30   #1
VirSpectorX
Big Clucker
 
Date d'inscription: November 2009
Messages: 110
Reputation: 0
Par défaut PAWNO Script Help

You know the script GetPlayerHealth right? The script should be like this:
pawn 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 est déconnecté  
Vieux 28/03/2010, 08h44   #2
Carlton
Banned
 
Date d'inscription: March 2010
Messages: 723
Reputation: 0
Par défaut 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.
pawn 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 est déconnecté  
Vieux 28/03/2010, 08h56   #3
[HiC]TheKiller
High-roller
 
Date d'inscription: March 2008
Localisation: New Zealand
Messages: 3 074
Reputation: 406
Par défaut Re: PAWNO Script Help

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

pawn Code:
stock GetPlayerHealthEx(playerid)
{
  new Float:health;
  GetPlayerHealth(playerid, health);
  return health;
}
__________________
People seem to enjoy negitive repping me for topics that I made in 2009.
Therefore, if you want to view my releases, you can go here.

Skype: TheKiller@dr.com
I do NOT script for cash. Add me on MSN if you need help with small issues.
[HiC]TheKiller est déconnecté  
Vieux 29/03/2010, 12h47   #4
biltong
Gangsta
 
Date d'inscription: January 2010
Messages: 551
Reputation: 0
Par défaut 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 est déconnecté  
Vieux 29/03/2010, 13h02   #5
aircombat
High-roller
 
Date d'inscription: February 2010
Messages: 1 542
Reputation: 9
Par défaut Re: PAWNO Script Help

example :

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

aircombat est déconnecté  
Vieux 29/03/2010, 13h33   #6
biltong
Gangsta
 
Date d'inscription: January 2010
Messages: 551
Reputation: 0
Par défaut 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 est déconnecté  
Vieux 29/03/2010, 13h40   #7
aircombat
High-roller
 
Date d'inscription: February 2010
Messages: 1 542
Reputation: 9
Par défaut Re: PAWNO Script Help

Citation:
Envoyé par 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 est déconnecté  
Vieux 11/04/2011, 16h05   #8
Seven_of_Nine
Huge Clucker
 
Avatar de Seven_of_Nine
 
Date d'inscription: February 2011
Localisation: Hungary
Messages: 372
Reputation: 12
Par défaut Re: PAWNO Script Help

Citation:
Envoyé par aircombat Voir le message
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 est déconnecté  
Vieux 11/04/2011, 16h20   #9
Y_Less
Beta Tester
 
Avatar de Y_Less
 
Date d'inscription: June 2008
Localisation: 629 - git.io/Y
Messages: 18 177
Reputation: 2541
Par défaut Re: PAWNO Script Help

Citation:
Envoyé par biltong Voir le message
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 est déconnecté  
 

Outils de la discussion
Modes d'affichage

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non


Discussions similaires
Discussion Auteur Forum Réponses Dernier message
Was Pawno script based on php? ReactionGameServers Help Archive 20 22/05/2010 19h25
script to my map in pawno hex575 Help Archive 17 02/02/2010 17h50
Help with pawno script master9808 Help Archive 9 23/11/2009 16h35
Help with Pawno Script Using If Alec24 Help Archive 3 27/02/2009 19h34


Fuseau horaire GMT. Il est actuellement 07h06.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Version française #23 par l'association vBulletin francophone