29.08.2011, 00:31
So...How I can do these:
I have this anticheat "Or maybe an anticheat detector:"
So if the administrator is not connected then dont send the message, then ban him
Like
How to add it, thanks.
I have this anticheat "Or maybe an anticheat detector:"
pawn Код:
public weaponanti()
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (GetPlayerWeapon(i) == 38)
{
new pname[200];
new string[200];
new ammo = GetPlayerAmmo(i);
new plrIP[16];
GetPlayerIp(i, plrIP, sizeof(plrIP));
GetPlayerName(i, pname, sizeof(pname));
format(string,sizeof(string),"%s [ID: %d] [IP:%s] is suspected of having Minigun Hacks (Ammo: %i) [Use /getinfo %d]",pname,i,plrIP,ammo,i);
CallRemoteFunction("SendClientMessageToAdmins","isi",0xFF0000,string,1);
format(string,sizeof(string),"Alex has a minigun");
SetTimer("banningtimer",15000,0);
banning[i] =1;
}
}
stock AdminConnected(playerid)
{
for(new a, g = GetMaxPlayers(); a < g; a++)
if(IsPlayerConnected(a) && IsPlayerAdmin(a)) return 1;
return 0;
}
Like
pawn Код:
AdminConnected
{else}
Ban(playerid);