Quote:
Originally Posted by Whai
From console.inc :
PHP Code:
/** * Called when a generic console command is invoked. * * @param client Index of the client, or 0 from the server. * @param args Number of arguments that were in the argument string. * @return An Action value. Not handling the command * means that Source will report it as "not found." */ typedef ConCmd = function Action (int client, int args);
so your
PHP Code:
public Action Command_hidetag(const char[] sCommand, int iClient, int sArgs)
does not match.
|
It fixed that problem but made another one:
Code:
(393) : error 017: undefined symbol "sCommand"
Part of code:
PHP Code:
public Action Command_hidetag(int iClient, int sArgs)
{
if (StrEqual(sCommand, "say"))
{
int iTeam = GetClientTeam(iClient);
if (iTeam > 0)
{
if (IsClientInGame(iClient))
{
if(IsPlayerAlive(iClient))
{
if (CheckCommandAccess(iClient, "chattag", ADMFLAG_ROOT))
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x0AHIDEROLE \x01| \x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x0AHIDEROLE \x01| \x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x0AHIDEROLE \x01| \x03%N \x08» \x01%s", iClient, sArgs);
}
else if (CheckCommandAccess(iClient, "chattag", ADMFLAG_RCON))
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x04MANAGER \x01| \x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x04MANAGER \x01| \x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x04MANAGER \x01| \x03%N \x08» \x01%s", iClient, sArgs);
}
else
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x08\x01\x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x08\x01\x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x08\x01\x03%N \x08» \x01%s", iClient, sArgs);
}
}
else
{
if (CheckCommandAccess(iClient, "chattag", ADMFLAG_ROOT))
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x0FDEAD \x01| \x0AHIDEROLE \x01| \x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x0FDEAD \x01| \x0AHIDEROLE \x01| \x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x0FDEAD \x01| \x0AHIDEROLE \x01| \x03%N \x08» \x01%s", iClient, sArgs);
}
else if (CheckCommandAccess(iClient, "chattag", ADMFLAG_RCON))
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x0FDEAD \x01| \x04MANAGER \x01| \x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x0FDEAD \x01| \x04MANAGER \x01| \x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x0FDEAD \x01| \x04MANAGER \x01| \x03%N \x08» \x01%s", iClient, sArgs);
}
else
{
if (GetClientTeam(iClient) == 3)
PrintToChatAll(" \x0FDEAD \x01| \x08\x01\x0B%N \x08» \x01%s", iClient, sArgs);
if (GetClientTeam(iClient) == 2)
PrintToChatAll(" \x0FDEAD \x01| \x08\x01\x09%N \x08» \x01%s", iClient, sArgs);
else if (GetClientTeam(iClient) == 1)
PrintToChatAll(" \x0FDEAD \x01| \x08\x01\x03%N \x08» \x01%s", iClient, sArgs);
}
}
}
}
}
}
This is another function in the code that works, there is sCommand in the function parentheses but when I put sCommand in the RegAdminCmd it will give the recent error:
PHP Code:
public Action OnClientSayCommand(int iClient, const char[] sCommand, const char[] sArgs)
{
int iTime, iYear, iMonth, iDay, iHour, iMinute, iSecond;
iTime = GetTime();
UnixToTime(iTime, iYear, iMonth, iDay, iHour, iMinute, iSecond, iTimezone);
if (StrEqual(sCommand, "say"))
{
int iTeam = GetClientTeam(iClient);
if (iTeam > 0)
{
if (IsClientInGame(iClient))
{
What should I do to get the sCommand to get defined?