Help! and thank you all!
#2

pawn Код:
dcmd_ban(playerid,params[])
{
    new
       
        Reason[256],
        pID,
        i;
    if(Player[playerid][admin] < 4){
        return SendClientMessage(playerid,COLOR_RED,"You Dont Have Right To Use This Command");
        }
    if(sscanf(params,"us",pID,Reason)){
        return SendClientMessage(playerid,COLOR_RED,"|| Usage: /ban [playerid] [reason] ||");
        }
    if(!IsPlayerConnected(pID)) {
        return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!");
        }

    if(pID == playerid) return SendClientMessage(playerid, COLOR_RED, "You cannot ban yourself!");
    if(Player[pID][admin] >= Player[playerid][admin]) return SendClientMessage(playerid, COLOR_RED,"That admin has a higher or the same level as you. You cannot ban him!");

    new
             name[MAX_PLAYER_NAME],
             string[256], string1[256], string2[256], string3[256], string4[256];
    GetPlayerName(pID,name,sizeof(name));
    format(string,sizeof(string),"**(ADMIN BAN)** %s(%d) %s",name,pID,Reason);
    format(string3,sizeof(string1),"You Have Been BANNED By Admin For Reason: %s",Reason);
    format(string2,sizeof(string2),"**If You Think Your Ban UNFAIR**");
    format(string3,sizeof(string3),"**Go To Out Website mkd-rp.tk**");
    format(string4,sizeof(string4),"**And Make Unban Apply With Right Format**");
    SendClientMessageToAll(COLOR_RED,string);
    SendClientMessage(i,COLOR_RED,string1);
    SendClientMessage(i,COLOR_RED,string2);
    SendClientMessage(i,COLOR_RED,string3);
    SendClientMessage(i,COLOR_RED,string4);
    SaveToFile("BanLog", string); Ban(pID);
    return 1;
}
Reply


Messages In This Thread
Help! and thank you all! - by [MKD]Max - 15.01.2011, 07:41
Re: Help! and thank you all! - by [L3th4l] - 15.01.2011, 07:54
Re: Help! and thank you all! - by Alex_Valde - 15.01.2011, 08:07
Re: Help! and thank you all! - by [MKD]Max - 15.01.2011, 08:20
Re: Help! and thank you all! - by [L3th4l] - 15.01.2011, 08:32
Re: Help! and thank you all! - by iggy1 - 15.01.2011, 08:33
Re: Help! and thank you all! - by Alex_Valde - 15.01.2011, 08:34

Forum Jump:


Users browsing this thread: 1 Guest(s)