/gethp
#1

Код:
(5037) : warning 219: local variable "PName" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
in dis command:

Код:
CMD:gethp(playerid, params[])
{
   new string[128], ID, Float:health; //Define string, ID & health float.
   if(sscanf(params, "u", ID)) return SendClientMessage(playerid, -1, "Correct usage: /gethp <playerid/name>"); //Show a message with correct usage of the command, if inputted wrong.
   if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "That player is not online."); //Output if ID is not online.
   GetPlayerHealth(ID, health); //Store health in health float.
   format(string,sizeof(string), "%s health:%f.", PName(ID),health); //String to store the output (Health will output as eg. 100.0000, as it is a float)
   SendClientMessage(playerid, -1, string); //Output string to the client.
   return 1;
}
Reply


Messages In This Thread
/gethp - by DerickClark - 06.03.2013, 23:31
Re: /gethp - by rangerxxll - 06.03.2013, 23:38
Re: /gethp - by DerickClark - 06.03.2013, 23:38
Re: /gethp - by rangerxxll - 06.03.2013, 23:40
Re: /gethp - by DerickClark - 06.03.2013, 23:41
Re: /gethp - by rangerxxll - 06.03.2013, 23:42
Re: /gethp - by DerickClark - 06.03.2013, 23:46
Re: /gethp - by rangerxxll - 06.03.2013, 23:49
Respuesta: /gethp - by Strier - 07.03.2013, 01:32
Re: /gethp - by DerickClark - 07.03.2013, 01:46

Forum Jump:


Users browsing this thread: 8 Guest(s)