26.08.2016, 15:24
Quote:
|
You can't do that. First you should copy everything from you Filterscript and put it in your Gamemode in the appropriate callbacks. Then only you can use pAdmin.
|
PHP код:
// in filterscript:
FS_SendMessageToAdmins(level, color, const string[])
{
if (!string[0]) return CallRemoteFunction("SendMessageToAdmins", "iis", level, color, "\1"); // passing "\1" if the string is empty to avoid the server crash
return CallRemoteFunction("SendMessageToAdmins", "iis", level, color, string);
}
// in gamemode:
forward SendMessageToAdmins(level, color, const string[]);
public SendMessageToAdmins(level, color, const string[])
{
if (string[0] == '\1') return; // empty string was passed - do nothing
for (new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
if (!IsPlayerConnected(i)) continue;
if (/* VARIABLE HERE FOR ADMIN */ >= level)
{
SendClientMessage(i, color, string);
}
}
}
pawn Код:
FS_SendMessageToAdmins(3, -1, "Hi admins");


