Health above 256
#9

Quote:
Originally Posted by Seif_
Quote:
Originally Posted by Serbish
Код:
if(strcmp("/health", cmd, true) == 0)
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_MAIN, "Type /health <ID>");
if(IsPlayerConnected(strval(tmp)) == 0) return SendClientMessage(playerid, COLOR_MAIN, "Enter a valid player ID!");
new player = strval(tmp);
new pname[MAX_PLAYER_NAME];
GetPlayerName(player, pname, sizeof(pname));
new string[256];
format(string, sizeof(string), "%s's health amount is %d!", pname, GetPlayerHealth(playerid));
SendClientMessage(playerid, COLOR_GREEN, string);
return 1;
}
You should at least give him a working code... indented.

Are you just doing that for a check or are you setting it to 4000 and then checking using GetPlayerHealth? If so, just store the value of the health you set in a variable.
You need glasses or why this code isn't working?
Reply


Messages In This Thread
Health above 256 - by Slice - 07.12.2008, 14:00
Re: Health above 256 - by Serbish - 07.12.2008, 14:02
Re: Health above 256 - by Slice - 07.12.2008, 14:07
Re: Health above 256 - by Serbish - 07.12.2008, 14:14
Re: Health above 256 - by Slice - 07.12.2008, 14:16
Re: Health above 256 - by Serbish - 07.12.2008, 14:30
Re: Health above 256 - by yom - 07.12.2008, 14:52
Re: Health above 256 - by Slice - 07.12.2008, 15:17
Re: Health above 256 - by Serbish - 07.12.2008, 15:21
Re: Health above 256 - by CracK - 08.12.2008, 12:26

Forum Jump:


Users browsing this thread: 1 Guest(s)