[help] Gang Chat
#1

ok i tryed to make a gang chat heres it is


Quote:

if(IsPlayerConnected(playerid))
{
if(text[0] == '!')
{
SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
new name[24], string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
printf("%s", string);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
SendClientMessage(i, GetPlayerColor(playerid), string);
}
}
return 0;
}

}

But I Got Errors May Someone Help and Fix This Command?
Reply
#2

Quote:
Originally Posted by Monster[HD]
Посмотреть сообщение
But I Got Errors May Someone Help and Fix This Command?
what errors?
Reply
#3

i got this command working but i cant find out how to change the color when u chat!!!
its like Color_Black but i want it to be COLOR_LIGHTBLUE
Reply
#4

pawn Код:
if(IsPlayerConnected(playerid))
{
    if(text[0] == '!')
    {
        SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
        new name[24], string[128];
        GetPlayerName(playerid, name, 24);
        format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
        printf("%s", string);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
                SendClientMessage(i, GetPlayerColor(playerid), string);
            }
        }
        return 0;
    }
}
pawn Код:
GetPlayerColor(playerid)
Change it for the color you want...
Reply
#5

SOOOOOO
if(IsPlayerConnected(playerid))
{
if(text[0] == '!')
{
SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
new name[24], string[128];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
SendClientMessage(i, COLOR_LIGHTBLUE(playerid), string);
}
}
return 0;
}
}


?
Reply
#6

pawn Код:
if(IsPlayerConnected(playerid))
{
    if(text[0] == '!')
    {
        SendClientMessage(playerid, 0xAA0000AA, "You are sending a gang message");
        new name[24], string[128];
        GetPlayerName(playerid, name, 24);
        format(string, sizeof(string), "[Team Chat]%s: %s", name, text[1]);
        printf("%s", string);
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                if(PlayerInfo[i][gang_member] || PlayerInfo[i][gang_leader] == PlayerInfo[playerid][gang_member] || PlayerInfo[playerid][gang_leader])
                SendClientMessage(i, COLOR_LIGHTBLUE, string);//<<<<
            }
        }
        return 0;
    }
}
pawn Код:
SendClientMessage(i, COLOR_LIGHTBLUE, string);
//or
SendClientMessage(i, 0x33CCFFAA, string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)