15.05.2012, 13:29
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
}