How can i send this two message in one? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How can i send this two message in one? (
/showthread.php?tid=503362)
How can i send this two message in one? -
ChristianIvann09 - 29.03.2014
This code, below. Im just going ask how can i send this two message into one only?
Код:
{
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);
}
SetPlayerChatBubble(playerid,text,COLOR_WHITE,20.0,5000);
for (new i=0;i<MAX_PLAYERS;i++)
{
if(BigEar[i] == 1)
{
SendClientMessage(i, COLOR_FADE1, string); // replace with message data of course
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
else
{
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
return 0; //don't want to send the message twice.
}
}
Thanks
Re: How can i send this two message in one? -
Equuuuin0X - 29.03.2014
Try this.
pawn Код:
case 0, 1:
{
if(BigEar[i] == 1)|| if(AdminDuty[playerid] == 1)
{
format(string, sizeof(string), "%s says: (( %s )) ", sendername, text);
SendClientMessage(i, COLOR_FADE1, string); // replace with message data of course
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
else if(BigEar[i] == 1)|| if(AdminDuty[playerid] == 0)
{
format(string, sizeof(string), "%s says: %s", sendername, text);
SendClientMessage(i, COLOR_FADE1, string);
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
return 0;
}
else if(BigEar[i] == 0)
{
ProxDetector(20.0, playerid,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
}
return 0; //don't want to send the message twice.
}