Quote:
Originally Posted by napster_10
hi im trying to use this code but i get this error
Code:
error 147: new-style declarations are required
can someone help?
|
PHP Code:
stock void PrintToAdmins(const char[] message, const char[] flags)
{
for (int x = 1; x <= MaxClients; x++)
{
if (IsValidClient(x) && IsValidAdmin(x, flags))
{
PrintToChat(x, message);
}
}
}
stock bool IsValidClient(int client, bool nobots = true)
{
if (client <= 0 || client > MaxClients || !IsClientConnected(client) || (nobots && IsFakeClient(client)))
{
return false;
}
return IsClientInGame(client);
}
stock bool IsValidAdmin(int client, const char[] flags)
{
int ibFlags = ReadFlagString(flags);
if ((GetUserFlagBits(client) & ibFlags) == ibFlags)
{
return true;
}
if (GetUserFlagBits(client) & ADMFLAG_ROOT)
{
return true;
}
return false;
}
You are using old synthax but you added at the begin of your plugin "#pragma newdecls required"
That means you have to only use new synthax
__________________