for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pFaction] != 0)
{
format(string, sizeof(string), "*** %s from your faction has logged in", GetPlayerNameEx(playerid));
SendClientMessage(i, COLOR_JUNIORADMIN, string);
}
if(PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && PlayerInfo[i][pGang] != 255)
{
format(string, sizeof(string), "*** %s from your gang has logged in", GetPlayerNameEx(playerid));
SendClientMessage(i, COLOR_JUNIORADMIN, string);
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(PlayerInfo[i][pFaction] == PlayerInfo[playerid][pFaction] && PlayerInfo[i][pFaction] != 0)
{
format(string, sizeof(string), "*** %s from your faction has logged in", GetPlayerNameEx(playerid));
SendClientMessageToAll( COLOR_JUNIORADMIN, string);
}
if(PlayerInfo[i][pGang] == PlayerInfo[playerid][pGang] && PlayerInfo[i][pGang] != 255)
{
format(string, sizeof(string), "*** %s from your gang has logged in", GetPlayerNameEx(playerid));
SendClientMessageToAll( COLOR_JUNIORADMIN, string);
}
}
When you want to show up as much as you want, you can not get a message for yourself
PHP код:
|
But if i use that it will appear for all player in gang or not in gang
|
Then why do you use these:
&& PlayerInfo[i][pFaction] != 0 && PlayerInfo[i][pGang] != 255 SendClientMessageToAll |
I didnt used SendClientMessageToAll
So Give me ? Fixed code i wont see it i want just other members of my gang see it .. If that possible |
SendGangMessage(gangid, color, const text[], {Float,_}:...)
{
static
args,
str[192];
if((args = numargs()) <= 3)
{
foreach(new i : Player)
{
if(PlayerInfo[i][pLogged] && PlayerInfo[i][pGang] == gangid)
{
SendClientMessage(i, color, text);
}
}
}
else
{
while(--args >= 3)
{
#emit LCTRL 5
#emit LOAD.alt args
#emit SHL.C.alt 2
#emit ADD.C 12
#emit ADD
#emit LOAD.I
#emit PUSH.pri
}
#emit PUSH.S text
#emit PUSH.C 192
#emit PUSH.C str
#emit PUSH.S 8
#emit SYSREQ.C format
#emit LCTRL 5
#emit SCTRL 4
foreach(new i : Player)
{
if(PlayerInfo[i][pLogged] && PlayerInfo[i][pGang] == gangid)
{
SendClientMessage(i, color, str);
}
}
#emit RETN
}
return 1;
}
if(PlayerInfo[playerid][pGang] >= 0)
{
SendGangMessage(PlayerInfo[playerid][pGang], COLOR_AQUA, "((%s has logged in. ))",GetPlayerRPName(playerid));
}