28.12.2017, 15:39
Quote:
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 |
PHP код:
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;
}
PHP код:
if(PlayerInfo[playerid][pGang] >= 0)
{
SendGangMessage(PlayerInfo[playerid][pGang], COLOR_AQUA, "((%s has logged in. ))",GetPlayerRPName(playerid));
}