14.03.2014, 15: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)
{
format(rank,sizeof(rank),"Admin",name,text);
}
else if(PlayerInfo[playerid][pHelper] > 0)
{
format(rank,sizeof(rank),"Helper");
}
else if(PlayerInfo[playerid][pDonateRank] > 0)
{
format(rank,sizeof(rank),"V.I.P.");
}
else if(PlayerInfo[playerid][pAdmin] < 0)
{
format(rank,sizeof(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
{
if(toggc[i] == 0)
{
SendClientMessage(playerid, COLOR_RED, "======== Use /toggc First! ========");
}
}
}
return 1;
}