01.04.2011, 04:09
How to send an admin a message?
I have this anitcheat:
It have some errors
I have this anitcheat:
pawn Код:
public AntiHealthHack()
{
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && Spawned[i] == 1)
{
GetPlayerHealth(i, health);
if(health > 100)
{
SendClientMessage(playerid, COLOR_GREEN, "Player %s is suspected of having a health hack.");
SendRCONMessage( str );
}
}
}
SendRCONMessage( string[ ] )
{
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if( IsPlayerAdmin( i ) )
{
if( GetPVarInt( i, "mMessage" ) == 1 ) continue;
SendClientMessage( i, 0xADE319, string );
SetPVarInt( i, "mMessage", 1 );
SetTimerEx( "ResetPlayer", 30000, false, "i", i );
}
}
}
return 1;
}