/heal command - Will it work?
#10

Quote:
Originally Posted by Puzi
I get a load of errors, about 20-30 errors :/ Any other possible way of doing /heal?
public OnPlayerCommandText(playerid, cmdtext[])
{
new
index,
cmd[20];
cmd = strtok(cmdtext, index);
if (strcmp(cmd, "/heal", true) == 0)
{
new
tmp[20],
id;
tmp = strtok(cmdtext, index);
if (strlen(tmp))
{
id = strval(tmp);
if (IsPlayerConnected(id))
{
SetPlayerHealth(id, 100.0);
SendClientMessage(id, 0x00FF00AA, "You have been healed");
SendClientMessage(playerid, 0x00FF00AA, "Player healed");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[ERROR:]Not A Valid PlayerID");
}
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "[Usage:] /heal [playerid]");
}
return 1;
}
return 0;
}
Reply


Messages In This Thread
/heal command - Will it work? - by Puzi - 29.05.2009, 09:58
Re: /heal command - Will it work? - by JoeDaDude - 29.05.2009, 10:00
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 10:03
Re: /heal command - Will it work? - by JoeDaDude - 29.05.2009, 10:05
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 10:57
Re: /heal command - Will it work? - by Gamer007 - 29.05.2009, 10:58
Re: /heal command - Will it work? - by miokie - 29.05.2009, 11:25
Re: /heal command - Will it work? - by Puzi - 29.05.2009, 11:32
Re: /heal command - Will it work? - by Weirdosport - 29.05.2009, 11:58
Re: /heal command - Will it work? - by zezam321 - 19.11.2009, 20:29

Forum Jump:


Users browsing this thread: 2 Guest(s)