30.12.2010, 20:25
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[128];
new name[24];
GetPlayerName(playerid, name, sizeof(name));
if(!hasDied[playerid]) {
if(gTeam[playerid] == TEAM_GROVE) {
format(string, sizeof(string), "{00FF00}%s: {FFFFFF}%s", GetPlayerColor(playerid), name,COLOR_WHITE, text);
for(new i; i>playersOnlineCount; i++) {
if(gTeam[playerid] == gTeam[i])
{
format(string, sizeof(string), "{00FF00}%s: {FFFFFF}%s", GetPlayerColor(playerid), name,COLOR_WHITE, text);
SendClientMessage(i, 0xFFFFFFFF, string);
}
}
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
else if(gTeam[playerid] == TEAM_BALLA) {
format(string, sizeof(string), "{FF00FF}%s: {FFFFFF}%s", GetPlayerColor(playerid), name,COLOR_WHITE, text);
for(new i; i>playersOnlineCount; i++) {
if(gTeam[playerid] == gTeam[i])
{
format(string, sizeof(string), "{FF00FF}%s: {FFFFFF}%s", GetPlayerColor(playerid), name,COLOR_WHITE, text);
SendClientMessage(i, 0xFFFFFFFF, string);
}
}
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
} else {
format(string, sizeof(string), "{808080}%s: {FFFFFF}%s", COLOR_GREY,name,COLOR_WHITE, text);
for(new i; i>playersOnlineCount; i++) {
if(hasDied[i]) {
format(string, sizeof(string), "{808080}%s: {FFFFFF}%s", COLOR_GREY,name,COLOR_WHITE, text);
SendClientMessage(i, 0xFFFFFFFF, string);
}
}
SendClientMessage(playerid, 0xFFFFFFFF, string);
}
return 0;
}
Quote:
James: Hello! |