27.05.2011, 16:46
Код:
dcmd_mute(playerid,params[]) { new Reason[256], pID; if(Player[playerid][admin] < 1){ return SendClientMessage(playerid, COLOR_RED, "Bad Command! Type /command for right commands"); } if(sscanf(params,"us",pID,Reason)){ return SendClientMessage(playerid,COLOR_GREY,"Usage: /mute [playerid] [reason] "); } if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,COLOR_RED,"Nobody is connected with this ID!"); } if(playerid == pID){ return SendClientMessage(playerid,COLOR_RED,"You Can Not Mute Yourself"); } if(Player[playerid][admin] < Player[pID][admin]){ return SendClientMessage(playerid,COLOR_RED,"You Can Not Mute A High Ranked Admin"); } if(Muted[pID] == 1) return SendClientMessage(playerid,COLOR_RED,"This player is already muted"); new name[24],aname[24], string1[128], string2[128], string3[128], string4[128]; GetPlayerName(pID,name,sizeof(name)); GetPlayerName(playerid,aname,sizeof(aname)); format(string1,sizeof(string1),"**(ADMIN MUTE)** %s(%d) %s",name,pID,Reason); format(string2,sizeof(string4),"Admin %s(%d) Has Mute %s(%d) For Reason: %s",aname,playerid,name,pID,Reason); format(string3,sizeof(string2),"You Have Been Muted By Admin For Reason: %s",Reason); format(string4, sizeof(string3), "You Have Mute %s(%d) For Reason: %s",name, pID, Reason); SendClientMessageToAll(COLOR_GOLD,string1); SendClientMessage(pID,0xFF7F50AA,string2); SendClientMessage(playerid,COLOR_GREEN,string3); SendAdminMessage(COLOR_YELLOW,string4); SaveToFile("Mutes",string4); Muted[pID] = 1;
}
in this message is been write like this here:
Код:
format(string2,sizeof(string4),"Admin %s(%d) Has Mute %s(%d) For Reason: %s",aname,playerid,name,pID,Reason);
Код:
format(string2,sizeof(string4),"%s %s(%d) Has Mute %s(%d) For Reason: %s",aname,playerid,name,pID,Reason);
now what i need how i can make the %s that i but it instead of Admin to give me rank so what i mean if player in my server is Moderator
if need the Message Say
Moderator %s(%d) Has Mute ,... To End Help! Please You Are The Key Guys.