for(new i; i < MAX_PLAYERS; ++ i)
{
if(IsPlayerAdmin(i) || pAdmin[i] > 0)
{
SendClienteMessa(i, -1, "Message to RCON Admin");
}
}
E:\**\ELC_AC.pwn(1366) : error 017: undefined symbol "pAdmin" E:\**\ELC_AC.pwn(1366) warning 215: expression has no effect E:\**\ELC_AC.pwn(1366) : error 001: expected token: ";", but found "]" E:\**\ELC_AC.pwn(1366) : error 029: invalid expression, assumed zero E:\**\ELC_AC.pwn(1366) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
for(new i; i < MAX_PLAYERS; ++ i)
{
if(IsPlayerAdmin(i) || pAdmin[i] > 0) //1366
{
SendClienteMessage(i, -1, "elc_str");
}
}
for(new i; i < MAX_PLAYERS; ++ i)
{
if(IsPlayerAdmin(i)) // it will send messages to rcon administrator!
{
SendClientMessage(i, -1, "elc_str");
}
}
enum aELCp
{
elc_money,
elc_ammo[13],
elc_weapon[13],
elc_tickfire,
elc_ammoFire,
elc_weaponFire,
Float:elc_health,
Float:elc_armour,
elc_timer,
Float:elc_posx,
Float:elc_posy,
Float:elc_posz,
elc_interior,
elc_virtualworld,
Float:elc_AllowTelX,
Float:elc_AllowTelY,
Float:elc_AllowTelZ,
elc_AntiTeleportHack,
elc_AntiWeaponHack,
elc_AntiAmmoBlockHack,
elc_AntiMoneyHack,
elc_AntiSpeedHack,
elc_AntiHealthHack,
elc_AntiArmourHack,
elc_AntiVehicleTelportHack,
#if defined MODE_DELAY_SEND_STATS
elc_GiveWeaponTime,
elc_GiveMoneyTime,
elc_GiveHealthTime,
elc_GiveArmourTime,
#endif
elc_SetPositionTime,
elc_PlayerEnterTime,
elc_PlayerEnterVeh,
elc_PossibleVehicleHack,
elc_LastUpdate,
elc_TimeSpawn
};
new CheatPlayerInfo[MAX_PLAYERS][aELCp];
enum aELCv
{
Float:elc_vHealth,
Float:elc_vX,
Float:elc_vY,
Float:elc_vZ,
Float:elc_vAngle,
elc_vSetPositionTime,
elc_vPossiblePlayerHack,
elc_vPossibleHackTime,
elc_vStatut
};
new CheatVehicleInfo[MAX_VEHICLES][aELCv];
#if defined NO_TICK_COUNT
enum aELCs
{
elc_TickCount,
elc_TimerTick
};
new CheatServerInfo[aELCs];
#endif
|
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.
|
// 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);
}
}
}
FS_SendMessageToAdmins(3, -1, "Hi admins");