heal command
#1

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new index, cmd[20];
	cmd = strtok(cmdtext, index); // error line

	if (strcmp(cmd, "/heal", true) == 0)
	{
		new tmp[20];
		tmp = strtok(cmdtext, index); // error line
  		if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF0000AA, "Usage : /heal <ID>");
		if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, 0xFF0000AA, "Player not found");
		SetPlayerHealth(strval(tmp), 100.0);
		SendClientMessage(strval(tmp), 0x00FF00AA, "You have been healed");
  		SendClientMessage(playerid, 0x00FF00AA, "Player healed");
		return 1;
	}
Код:
error 047: array sizes do not match, or destination array is too small
error 047: array sizes do not match, or destination array is too small
Reply


Messages In This Thread
heal command - by lsreskjn - 14.08.2013, 15:53
Re : heal command - by Garwan50 - 14.08.2013, 18:54
Re: heal command - by Edix - 14.08.2013, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)