ban and unban
#1

Код:
CMD:ban(playerid, params[])
{
    if(PlayerInfo[playerid][pLogovan] < 1) return SCM(playerid, -1, "Not logged");
    if(PlayerInfo[playerid][pAdmin] < 3) return SCM(playerid, -1, "No perm");

    new
        playerID,
        reason[32]
    ;

    if(sscanf(params, "us[32]", playerID, reason)) return SCM(playerid, COLOR_GREY, "CMD: /ban [id] [reason]");
    if(!IsPlayerConnected(playerID)) return SCM(playerid, COLOR_GREY, "Not online!");

    new
        playerName[MAX_PLAYER_NAME],
        targetName[MAX_PLAYER_NAME],
        reason[64],
        string[144],
        string2[144],
		id
    ;

    GetPlayerName(playerid, playerName, sizeof(playerName));
    GetPlayerName(playerID, targetName, sizeof(targetName));

    format(string, sizeof(string), "'%s was baned by %s.", targetName, playerName);
    SCMTL(COLOR_RED, string);
    SCM(playerid, -1, "you are baned!");
	format(string2,sizeof(string2),"SRW; You are baned  %s | Reason: %s",playerName,reason);
    SCM(id,-1,string2);
    SetTimerEx("Ban", 1000, false, "i", playerid);
   
    format(string, sizeof(string), "'%s was banned by %s |Reason: %s ", targetName, playerName, reason);
    SendMessageToAdmins(0xFF6347FF, string, 1);
    return 1;
}
This is my ban cmd but when i ban player he doesn't recive reason only show srw you are baned ... | Reason: .And how to make unban for this cmmd
Reply


Messages In This Thread
ban and unban - by Deny1 - 14.02.2016, 13:39
Re: ban and unban - by zPain - 14.02.2016, 13:46
Re: ban and unban - by Deny1 - 14.02.2016, 13:50
Re: ban and unban - by zPain - 14.02.2016, 13:56
Re: ban and unban - by LovelySoomro - 14.02.2016, 14:42

Forum Jump:


Users browsing this thread: 1 Guest(s)