SA-MP Forums Archive
why - 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: why (/showthread.php?tid=655227)



why - Thanks - 16.06.2018

I've putting a command only for COPS,SWAT,FBI,CIA,ARMY But only COPS Can use it why

PHP код:
if(!PoliceTeam(GetPlayerSkin(playerid) && SWAT(GetPlayerSkin(playerid) && Army(GetPlayerSkin(playerid) && FBII(GetPlayerSkin(playerid) && CIA(GetPlayerSkin(playerid))))))) return SendClientMessage(playerid0xE74C3CFF"{FF0000}Error: {FFFFFF}Only Law Enforcement may use this command."); 



Re: why - RedRex - 16.06.2018

Hi Sir!!

PHP код:
    if(!PoliceTeam(GetPlayerSkin(playerid)) && !SWAT(GetPlayerSkin(playerid)) && !Army(GetPlayerSkin(playerid)) && !FBII(GetPlayerSkin(playerid)) && !CIA(GetPlayerSkin(playerid))) return SendClientMessage(playerid0xE74C3CFF"{FF0000}Error: {FFFFFF}Only Law Enforcement may use this command."); 



Re: why - kovac - 17.06.2018

Take a look at control structures.
https://sampwiki.blast.hk/wiki/Control_Structures

You're looking for or ( || ) operator.

AND AS YOU HAVE BEEN TOLD COUNTLESS OF TIMES: - THE WAY YOU ARE CHECKING FOR PLAYER TEAM IS EXTREMELY BAD. YOU SHOULD CONSIDER CHANGING IT ASAP. OTHERWISE DON'T COMPLAIN ABOUT BUGS.



Re: why - Logic_ - 17.06.2018

Quote:
Originally Posted by kovac
Посмотреть сообщение
Take a look at control structures.
https://sampwiki.blast.hk/wiki/Control_Structures

You're looking for or ( || ) operator.

AND AS YOU HAVE BEEN TOLD COUNTLESS OF TIMES: - THE WAY YOU ARE CHECKING FOR PLAYER TEAM IS EXTREMELY BAD. YOU SHOULD CONSIDER CHANGING IT ASAP. OTHERWISE DON'T COMPLAIN ABOUT BUGS.
Don't consider wasting your time for better of other people who don't want to change themselves or their code.

"You can lead a horse to water, but you can't make it drink" - Remember that.