OnPlayerText Problem
#1

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.
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
Reply


Messages In This Thread
OnPlayerText Problem - by Kostas' - 26.11.2011, 12:31
Re: OnPlayerText Problem - by Sascha - 26.11.2011, 12:35
Re: OnPlayerText Problem - by Kostas' - 26.11.2011, 12:46

Forum Jump:


Users browsing this thread: 2 Guest(s)