OnPlayerText Problem
#4

pawn Код:
public OnPlayerText(playerid, text[])
{

    if(AccountInfo[playerid][VIPlevel] == 1)
    {
        new str[128];
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        format(str, sizeof(str), "{FFFFFF}["Bronze"Bronze "PURPLE"VIP]"Bronze" %s: %s", playername, text);
        SendPlayerMessageToAll(playerid, str);
        return 0;
    }
    if(AccountInfo[playerid][VIPlevel] == 2)
    {
        new str[128];
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        format(str, sizeof(str), "{FFFFFF}["Silver"Silver "PURPLE"VIP]"Silver" %s: %s", playername, text);
        SendPlayerMessageToAll(playerid, str);
        return 0;

    }
    if(AccountInfo[playerid][VIPlevel] == 3)
    {
        new str[128];
        new playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
        format(str, sizeof(str), "{FFFFFF}["Gold"Gold "PURPLE"VIP]"Gold" %s: %s", playername, text);
        SendPlayerMessageToAll(playerid, str);
        return 0;

    }
    return 0; // ignore the default text and send the custom one
}
Reply


Messages In This Thread
OnPlayerText Problem - by [D]ry[D]esert - 15.05.2012, 13:02
Re: OnPlayerText Problem - by doreto - 15.05.2012, 13:05
Re: OnPlayerText Problem - by [D]ry[D]esert - 15.05.2012, 13:22
Re: OnPlayerText Problem - by doreto - 15.05.2012, 13:29
Re: OnPlayerText Problem - by TzAkS. - 15.05.2012, 13:30
Re: OnPlayerText Problem - by [D]ry[D]esert - 15.05.2012, 13:56
Re: OnPlayerText Problem - by Andi_Evandy - 15.05.2012, 14:26

Forum Jump:


Users browsing this thread: 2 Guest(s)