sendername = GetPlayerNameEx(playerid);
switch(PlayerInfo[playerid][pAccent])
{
case 0, 1:
{
if(AdminDuty[playerid] == 1)
{
format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
}
else
{
format(string, sizeof(string), "%s says: %s", sendername, text);
}
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
}
new BigEar[MAX_PLAYERS];
CMD:bigears(playerid, params[])
{
if( PlayerInfo[playerid][pAdmin] >= 3) {
if(AdminDuty[playerid] != 1 && PlayerInfo[playerid][pAdmin] < 5)
return SendClientMessage(playerid,COLOR_WHITE, "You're not on-duty as admin. To access your admin commands you must be on-duty. Type /aduty to go on-duty.");
if (!BigEar[playerid]) {
BigEar[playerid] = 1;
SendClientMessageEx(playerid, COLOR_GRAD2, "Your ears have grown to gargantuan proportions!");
}
else if (BigEar[playerid]) {
(BigEar[playerid] = 0);
SendClientMessageEx(playerid, COLOR_GRAD2, "Your ears have shrunk.");
}
}
return 1;
}
|
https://sampforum.blast.hk/showthread.php?tid=124428
I think this will help, instead of rewriting the process. |
If(BigEars)[playerid] == 1)
SendLocalMessage(playerid, COLOR_WHITE, 999999, str);
public OnPlayerText(playerid) // or whatever
{
for (new i=0;i<MAX_PLAYERS;i++)
{
If(BigEars)[i] == 1)
{
SendClientMessage(...); // replace with message data of course
}
else
{
SendLocalMessage(...);
}
}
return 0; //don't want to send the message twice.
}
|
Ok, I think I understand. That's going to require more script.
Try something like: pawn Код:
|
for (new i=0;i<MAX_PLAYERS;i++)