20.07.2013, 15:27
Hi all.
I've some problems in scripting. Namely, with dcmd & unknow command.
1. Dcmd: so, if I adding this command:
i've got this error:
"undefined symbol dcmd_heal"
PS: I added
2: Unknow command: so, i tried to add this script:
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!
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; }
"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
Код:
return SendClientMessage(playerid, COLOR_WHITE, "{FFA500}Info: {FFFFFF}Unavailable command! Use /help!"); }
@ Sorry for my (very) bad english!