15.05.2012, 13:56
Quote:
pawn Код:
|
Quote:
You got somewhere in OnPlayerText something like this
Код:
GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s : %s", sendername, text); Код:
if(AccountInfo[playerid][VIPlevel] == 0) { // codes } |
pawn Код:
public OnPlayerText(playerid, text[])
{
if(AccountInfo[playerid][VIPlevel] == 0)
{
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] == 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;
}
if(text[0] == '!')
{
new str[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(str, sizeof(str), "{FFFFFF}[TEAM CHAT]{00FF00} %s: %s", playername, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid])
SendClientMessage(i, COLOR_ORANGE, str);
return 0;
}
if(text[0] == '/')
{
new str[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
format(str, sizeof(str), "{FFFFFF}[Commands]{00FF00} %s: %s", playername, text);
for(new i = 0; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(i) && AccountInfo[playerid][AdminLevel] >= 1)
SendMessageToAdmins(COLOR_ORANGE, str);
return 0;
}
if(Mute[playerid] == 1)
{
SendClientMessage(playerid,COLOR_BRIGHTRED,"You Cant Use The Chat You Have Been Muted");
return 0;
}
return 0;
}