Police robbery alert problems - 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: Police robbery alert problems (
/showthread.php?tid=463654)
Police robbery alert problems -
Uberanwar - 13.09.2013
Hey guys, I would like to tell you about my problem. I have a problem with the police robbery alert.
In my server, I have 5 law enforcement agency. DRT, COP, SWAT, FBI, ARMY.
I had this problem after I added
DRT team!
This is my SendRadioMessageToCops stock.
pawn Код:
stock SendRadioMessageToCops(const str[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerSpawned(i) && gTeam[i] == COP && gTeam[i] == DRT && gTeam[i] == SWAT && gTeam[i] == FBI && gTeam[i] == ARMY) SendClientMessage(i, LIGHT_BLUE, str);
}
return true;
}
Is there any problems here, I don't think so right? All law enforcement agencies doesn't get robbery alert! Even COP team
But when I do..
stock SendRadioMessageToCops(const str[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerSpawned(i) && gTeam[i] == COP) SendClientMessage(i, LIGHT_BLUE, str);
}
return true;
}
then the police Robbery alert works for COP team! But the other law enforcement agencies not.
Please help.
AW: Police robbery alert problems -
Skimmer - 13.09.2013
Try this
pawn Код:
stock SendRadioMessageToCops(const str[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerSpawned(i) && (gTeam[i] == COP || gTeam[i] == DRT || gTeam[i] == SWAT || gTeam[i] == FBI || gTeam[i] == ARMY)) SendClientMessage(i, LIGHT_BLUE, str);
}
return true;
}
Re: AW: Police robbery alert problems -
Uberanwar - 14.09.2013
Quote:
Originally Posted by Skimmer
Try this
pawn Код:
stock SendRadioMessageToCops(const str[]) { for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerSpawned(i) && (gTeam[i] == COP || gTeam[i] == DRT || gTeam[i] == SWAT || gTeam[i] == FBI || gTeam[i] == ARMY)) SendClientMessage(i, LIGHT_BLUE, str); } return true; }
|
Thanks alot, it works. +rep for you.
What does actually || means?