26.11.2011, 12:31
I am trying to make an Administrator Chat and a VIP Chat. But for some reason, it's bugged.
Look picture. It doesn't show me the text and it's bugged with the OnPlayerText from my FS. Ignore the double message, it's because I am admin and Vip to test it.
Here is the code.
Look picture. It doesn't show me the text and it's bugged with the OnPlayerText from my FS. Ignore the double message, it's because I am admin and Vip to test it.
Here is the code.
pawn Код:
public OnPlayerText(playerid, text[])
{
GetPlayerName(playerid, pname, sizeof(pname));
/*==============================================================================
Administrator Chat
==============================================================================*/
if(text[0] == '#' && PlayerInfo[playerid][Level] >= 1) {
format(str2, sizeof(str2), "[Admin Chat]: %s (%d): %s", pname, playerid, text[1]);
MessageToAdmins(COLOR_YELLOW, str2);
return 0;
}
/*==============================================================================
Vip Chat
==============================================================================*/
if(text[0] == '*' && PlayerInfo[playerid][Vip] == 1 || PlayerInfo[playerid][Level] >= 1) {
format(str3, sizeof(str3), "[Vip Chat]: %s: %s", pname, playerid, text[1]);
MessageToVips(COLOR_CYAN, str3);
MessageToAdmins(COLOR_CYAN, str3);
return 0;
}
// Rest Of Code