15.01.2011, 07:41
Here is ban commands i have made it all work i try it its nice but what i need can someone help me to add something thats cant make me ban my self and high admin level
Код:
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!"); } 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; }