[php]
PHP код:
wn(86) : error 017: undefined symbol "dcmd"
C:\Documents and Settings\My Documents\Downloads\)\filterscripts\Tracefeature.pwn(246) : warning 203: symbol is never used: "dcmd_trace"
this is how I put the script:
pawn Код:
#pragma tabsize 0
public OnPlayerCommandText(playerid, cmdtext[])
{
line 86: dcmd(trace, 5, cmdtext);
return 1;
}
dcmd_trace(playerid, params[])
{
if(!strlen(params)){
SendClientMessage(playerid, YOURCOLOR, "/trace [id]");
return 1;
}
new pid = strval(params);
if(!IsPlayerConnected(pid)){
SendClientMessage(playerid, YOURCOLOR, "Player is not connected");
return 1;
}else{
new string[256], name[MAX_PLAYER_NAME], Float:x, Float:y, Float:z;
GetPlayerName(pid, name, sizeof(name));
GetPlayerPos(pid, x, y, z);
format(string, sizeof(string), "%s's position: %f, %f, %f", name, x, y, z);
SendClientMessage(playerid, YOURCOLOR, string);
}
}
this is who I defined the dcmd:
PHP код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1