public OnPlayerText(playerid,text[])
{
if(text[0] == \'!\') {
new string[256];
new tmpcolour;
switch(gTeam[playerid]) {
case TEAM_GROVE: tmpcolour = COLOR_GREEN;
case TEAM_BALLAS: tmpcolour = COLOR_PINK;
case TEAM_VAGOS: tmpcolour = COLOR_YELLOW;
case TEAM_AZTECAS: tmpcolour = COLOR_LIGHTBLUE;
case TEAM_POLICE: tmpcolour = COLOR_BLUE;
default: {
return 0;
}
}
GetPlayerName(playerid,pname,sizeof(pname));
format(string,256,\"%s: %s\",pname,text[1]);
for(new i; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(gTeam[playerid] == gTeam) {
SendClientMessage(i,tmpcolour,string);
}
}
}
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
}
return 1;
}
ChuckNorris:Szerkeztve.
public OnPlayerText(playerid,text[])
{
SetPlayerChatBubble(playerid, text, 0xFF0000FF, 100.0, 10000);
if(text[0] == \'!\')
{
new string[256];
new tmpcolour;
switch(gTeam[playerid])
{
case TEAM_GROVE: tmpcolour = COLOR_GREEN;
case TEAM_BALLAS: tmpcolour = COLOR_PINK;
case TEAM_VAGOS: tmpcolour = COLOR_YELLOW;
case TEAM_AZTECAS: tmpcolour = COLOR_LIGHTBLUE;
case TEAM_POLICE: tmpcolour = COLOR_BLUE;
default: {
return 0;
}
}
GetPlayerName(playerid,pname,sizeof(pname));
format(string,256,\"%s: %s\",pname,text[1]);
for(new i; i < MAX_PLAYERS; i++) {
if(IsPlayerConnected(i)) {
if(gTeam[playerid] == gTeam) {
SendClientMessage(i,tmpcolour,string);
}
}
}
}
return 1;
}
Szerk.: 700. Hozzászólás!