27.02.2012, 17:37
Hi dude!
You're making it way too complicated! Why don't you use it like this? Add this under "OnPlayerText":
And forward this:
I don't know what your enum for the player's info is like, just put a VIP-Level into it and replace the variables with your own! FINISHED!
Hope I could help!
You're making it way too complicated! Why don't you use it like this? Add this under "OnPlayerText":
pawn Код:
if(text[0] == '*')
{
if(PlayerInfo[playerid][VIP] >= 1)
{
new str[128], name[24];
GetPlayerName(playerid, name, 24);
format(str, 128, "[VIP CHAT] %s(%d): %s", name,playerid, text[1]);
SendMessageToVIP(COLOR_KHAKI,str);
return 0;
}
return 1;
}
pawn Код:
forward SendMessageToVIP(color,const string[]);
pawn Код:
public SendMessageToVIP(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][VIP] >= 1)
SendClientMessage(i, color, string);
}
return 1;
}
Hope I could help!