2 problems.
#1

Hi all.

I've some problems in scripting. Namely, with dcmd & unknow command.

1. Dcmd: so, if I adding this command:
Код:
dcmd_heal(playerid, params[])
{
        new id;
	if (!strlen(params)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: \"/heal <playerid>\"");
	id = strval(params);
	if (!IsPlayerConnected(id))SendClientMessage(playerid, 0xFF0000AA, "Player not found");
	SetPlayerHealth(id, 100.0);
	SendClientMessage(id, 0x00FF00AA, "You have been healed");
	SendClientMessage(playerid, 0x00FF00AA, "Player healed");
	return 1;
}
i've got this error:
"undefined symbol dcmd_heal"

PS: I added
Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
2: Unknow command: so, i tried to add this script:
Код:
 	return SendClientMessage(playerid, COLOR_WHITE, "{FFA500}Info: {FFFFFF}Unavailable command! Use /help!");
}
after callback OnPlayerCommandReceived (accurate, under return), but when i use some commands (/sm, /pay), this message appears, although commands are included in callback OnPlayerCommandsReceived.

@ Sorry for my (very) bad english!
Reply


Messages In This Thread
2 problems. - by Addons - 20.07.2013, 15:27
Re: 2 problems. - by arakuta - 20.07.2013, 16:49
Re: 2 problems. - by Addons - 20.07.2013, 17:34
Re: 2 problems. - by Lordzy - 20.07.2013, 17:38
Re: 2 problems. - by Addons - 20.07.2013, 17:53
Re: 2 problems. - by morocco - 20.07.2013, 17:57
Re: 2 problems. - by morocco - 20.07.2013, 17:59
Re: 2 problems. - by Addons - 20.07.2013, 18:15

Forum Jump:


Users browsing this thread: 4 Guest(s)