14.03.2014, 17:32
pawn Код:
CMD:g(playerid,params[])
{
new rank[50],name[50],text[200],msg[250];
if(sscanf(params,"s[200]",text)) return SendClientMessage(playerid,-1,"USAGE: /g [text]");
GetPlayerName(playerid,name,sizeof(name));
if(PlayerInfo[playerid][pAdmin] > 0){rank ="Admin";}
if(PlayerInfo[playerid][pHelper] > 0){rank ="Helper";}
if(PlayerInfo[playerid][pDonateRank] > 0){rank ="V.I.P.";}
if(PlayerInfo[playerid][pAdmin] < 0 || PlayerInfo[playerid][pHelper] < 0 || PlayerInfo[playerid][pDonateRank] < 0) {rank ="Player";}
format(msg,sizeof(msg),"(( %s %s: %s ))",rank,name,text);
for(new i=0;i<=MAX_PLAYERS;i++)
{
if(toggc[i] == 1)
{
SendClientMessage(i,COLOR_ORANGE,msg);
}
else{SendClientMessage(playerid, COLOR_RED, "======== Use /toggc First! ========");}
}
return 1;
}