15.02.2014, 13:40
(
Last edited by bustern; 16/02/2014 at 03:23 PM.
)
The colors needed for your script:
The command we will use is this:
Now add this somewhere in your script
Also add this somewhere
I hope this will be helpful
If you have questions or problems, just write here.
PHP Code:
#define COLOR_WHITE 0xFFFFFFFF
#define COLOR_TEAMCHAT 0x8D8DFFFF
PHP Code:
CMD:t(playerid, params[])
{
new string[128];
if(sscanf(params, "s[128]", params)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: (/t)team [text]");
format(string, sizeof(string), "[Team Chat]%s: %s", RPN(playerid), params);
SendPlayerTeamMessage(playerid, COLOR_TEAMCHAT, string);
SetPlayerChatBubble(playerid,params,COLOR_TEAMCHAT,20.0,5000);
return 1;
}
PHP Code:
stock SendPlayerTeamMessage(playerid,color, string[])
{
foreach(Player, i)
{
if(gTeam[i] == gTeam[playerid]) //Here i used gteam(You can use PlayerInfo[playerid][Faction/Gang/Fam]
{
SendClientMessage(i, color, string);
}
}
return 1;
}
PHP Code:
stock RPN(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
If you have questions or problems, just write here.