29.08.2011, 16:53
It is ALL commands. And it has never happend before.
However this is the kick command:
However this is the kick command:
pawn Code:
command(kick, playerid, params[])
{
new id, reason[128], string[ 128 ];
if( sscanf( params, "us[128]", id, reason) )
{
if( Player[playerid][AdminLevel] >= 1 )
{
SendClientMessage( playerid, WHITE, "SYNTAX: /kick [playerid] [reason]" );
}
}
else
{
if( Player[playerid][AdminLevel] >= 1)
{
if(IsPlayerConnected(id) )
{
if( Player[id][AdminLevel] > Player[playerid][AdminLevel])
{
SendClientMessage( playerid, WHITE, "You do not have the authority to do that (higher rank)." );
return 1;
}
format( string, sizeof( string ), "Kick: %s has been kicked by %s, reason: %s", GetName(id), Player[playerid][AdminName], reason);
SendClientMessageToAll(LIGHTRED, string);
AdminActionsLog( string );
format( string, sizeof( string ), "You have been kicked from the server for %s", reason);
SendClientMessage(id, WHITE, string);
Kick(id);
}
else
{
SendClientMessage( playerid, WHITE, "That player is not connected." );
return 1;
}
}
}
return 1;
}