08.01.2011, 00:27
I'd like to have a kick command where i only have to write the ID or a Part of the Name. If tryed the Godfather command but this doesn't works. Please help me.
CMD:kick(playerid, params[]) {
new id, reson[128], string[ 128 ];
if( sscanf( params, "uz", reson) )
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)// put your admin level thing here
{
SendClientMessage(playerid, WHITE, "[SEVER]:{20DB16} Usage /kick [ID] [RESON]");
}
}
else
{
if(PlayerInfo[playerid][pAdminLevel] >= 1)
{
if(IsPlayerConnectedEx(id) )
{
if(PlayerInfo[playerid][pAdminLevel] >= PlayerInfo[id][pAdminLevel])
{
format(string, sizeof(string), "You have bean KICK By a Admin %s Because of %s", GetNameEx(playerid), params);
NearByMessage(playerid, WHITE, string);
Kick( id );
}
}
else
{
SendClientMessage( playerid, WHITE, "That player is not connected or isn't logged in." );
}
}
}
return 1;
}