SendAdminsMessage - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SendAdminsMessage (
/showthread.php?tid=245595)
SendAdminsMessage -
Alex_Obando - 01.04.2011
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
Re: SendAdminsMessage -
ronnie3148 - 01.04.2011
Post the errors.
Re: SendAdminsMessage -
PinkFloydLover - 01.04.2011
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