28.01.2016, 17:28
The question is simple. I'm wondering how many && can you use in a if structure-..is there a limit or?
|
I'm developing a Roleplay server and some commands require you to have certain things. ( such as not be cuffed, be spawned, not AFK etc-.. )
|
if(!p_DATA[playerid][p_Cuffed]) return SendClientMessage(...); if(!p_DATA[playerid][p_AFK]) return SendClientMessage(...);
|
In that case you are best to just stack if() return one lines ex.
Код:
if(!p_DATA[playerid][p_Cuffed]) return SendClientMessage(...); if(!p_DATA[playerid][p_AFK]) return SendClientMessage(...); |
layer is cuffed, you cannot use this cmd on him",if afk"ERROR
layer is afk. you cannot use this command on him" 