How can I add a delay to my kick?
#4

Why not do it this way?

pawn Код:
CMD:kick(playerid, params[])
{
    new Float:x, Float:y, Float:z;
    new string[128],
    pname[MAX_PLAYER_NAME],
    victimname[MAX_PLAYER_NAME],
    victimid,
    reason[30];
    if(PlayerInfo[playerid][pAdmin] > 3)
    {
        if(sscanf(params, "us[30]", victimid, reason)) return SendClientMessage(playerid, COLOR_RED, "Usage: /kick [playerid/name] [reason]");
        GetPlayerName(playerid, pname, sizeof(pname));
        GetPlayerName(victimid, victimname, sizeof(victimname));
        if(!IsPlayerConnected(victimid)) return SendClientMessage(playerid, COLOR_RED, "Error: This player is not connected.");
        format(string, 128, "AdminCmd: %s has kicked %s. Reason:%s!",pname,victimname,reason);
        SendClientMessageToAll(COLOR_RED, string);
        SetTimerEx("kick",1000,false,"i",victimid);
    }
    else return SendClientMessage(playerid, COLOR_RED, "You must be Administrator Level 3 or higher to use this command!");
    return 1;
}

forward kick(victimid);
public kick(victimid)
{
    Kick(victimid);
    return 1;
}
Edited so feel free to try again.
Reply


Messages In This Thread
How can I add a delay to my kick? - by lramos15 - 07.06.2013, 20:22
Re: How can I add a delay to my kick? - by Facerafter - 07.06.2013, 20:25
Re: How can I add a delay to my kick? - by Red_Dragon. - 07.06.2013, 20:27
Re: How can I add a delay to my kick? - by DobbysGamertag - 07.06.2013, 20:45
Re: How can I add a delay to my kick? - by CrazyChoco - 07.06.2013, 20:48
Re: How can I add a delay to my kick? - by lramos15 - 07.06.2013, 22:57
Re: How can I add a delay to my kick? - by lramos15 - 07.06.2013, 23:05
Re: How can I add a delay to my kick? - by Guest123 - 08.06.2013, 01:11

Forum Jump:


Users browsing this thread: 2 Guest(s)