SendAdminsMessage
#1

How to send an admin a message?
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;
}
It have some errors
Reply
#2

Post the errors.
Reply
#3

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 );
            }
        }
    }
    return 1;
}



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;
}
You forgot some brackets
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)