27.09.2012, 14:26
On top of your script
pawn Код:
forward VIPMSG(color,const string[]);
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!' && PlayerInfo[playerid][dRank] >= 1)
{
new string[128];
GetPlayerName(playerid,string,sizeof(string));
format(string,sizeof(string),"[VIP Chat]%s: %s",string,text[1]);
VIPMSG(0x8FBC8FFF,string);
return 0;
}
return 1;
}
pawn Код:
public VIPMSG(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if((IsPlayerNPC(i)) || (!IsPlayerConnected(i))) continue;
if((PlayerInfo[i][dRank] >= 1)) SendClientMessage(i, color, string);
}
return 1;
}