Hello everyone, I would like to ask, what is the best way to make /ban cmd with choosable time. I mean that you could choose hours, minutes or days. Thanks everyone for advices
Код:
CMD:ban(playerid,params[])
{
new id,reason,pName[MAX_PLAYER_NAME],string[128];
if(sscanf(params,"uz[128]",id)) SendClientMessage(playerid,COLOR_RED,"System: /ban [ID]");
else
{
if(PlayerInfo[playerid][pAdmin] >=4)
{
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string,sizeof(string),"Player %s was banned by %s Reason: %s",id,pName,reason);
SendClientMessageToAll(COLOR_RED,string);
BanEx(id,"reason");
}
}
return 1;
}