06.10.2014, 03:10
Heres the cmd that using that stock:
Also, im using TimeStampToDate
PHP код:
CMD:bantemp( playerid, params[ ] )
{
if(pInfo[playerid][pAdminLevel] >= 2) return SCM(playerid, -1, "You are not authorized to use this command.");
new id, reason[64];
if(sscanf( params, "us[64]", id, reason ) ) return SendClientMessage( playerid, -1, "Usage: /ban <Part Of Name> <hours> <minutes> <reason>" );
if( !IsPlayerConnected( id ) || id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "That player is not connected!" );
new str[ 128 ], pName[ MAX_PLAYER_NAME ], aName[ MAX_PLAYER_NAME ],hours,minutes;
GetPlayerName( playerid, aName, MAX_PLAYER_NAME );
GetPlayerName( id, pName, MAX_PLAYER_NAME );
format( str, sizeof( str ), "{a7c0dc}%s was banned temporarily by administrator %s for %i hours and %i minutes (Reason: %s)", pName, aName, hours, minutes, reason );
SendClientMessageToAll( -1, str );
BanPlayerTemp(playerid,reason,aName,hours,minutes);
return 1;
}