/kick for certain time.
#1

How could i get player kicked for certain amount of time, and also display msg to all and when the player tries to join, he/she will get message example "You are kicked for 4minutes"

PHP Code:
CMD:kick(playeridparams[], help)
{
    if(
Info[playerid][Level] >= 2)
    {
        new 
idreason[50],string[128];
        if(
sscanf(params"uS()[50]"idreason)) return SCM(playeridred"Kick player: /kick <PlayerID> <Reason>");
        if(
id == INVALID_PLAYER_ID) return SCM(playeridred"Invalid player id");
        if(
Info[playerid][Level] <= Info[id][Level]) return ShowMessage(playeridred6);
        if(!
isnull(reason))
        
format(string,sizeof(string),"%s %s has kicked %s: %s",GetLevel(playerid),GetName(playerid),GetName(id),reason);
        else 
format(string,sizeof(string),"%s %s has kicked %s",GetLevel(playerid),GetName(playerid),GetName(id));
        
SendClientMessageToAll(red,string);
        return 
DelayKick(id);
    }
    else return 
ShowMessage(playeridred1);

Reply


Messages In This Thread
/kick for certain time. - by MacGyverr - 19.01.2019, 12:04
Re: /kick for certain time. - by Heress - 19.01.2019, 12:34
Re: /kick for certain time. - by Chyakka - 19.01.2019, 12:47
Re: /kick for certain time. - by Bolex_ - 19.01.2019, 12:50

Forum Jump:


Users browsing this thread: 1 Guest(s)