10.02.2019, 14:10
Nope. Except the fact that you can:
Instead of:
But only if the variable is declared as a boolean.
Then you should stop the running code inside the statements with a return so you don't get two actions performed, I can see that there are probabilities that you receive two things, and if your if statement has only one line of code, there is no need to add braces, you can:
Instead of:
Код:
if(PlayerIsInJizzy[playerid])
Код:
if(PlayerIsInJizzy[playerid] == 1)
Then you should stop the running code inside the statements with a return so you don't get two actions performed, I can see that there are probabilities that you receive two things, and if your if statement has only one line of code, there is no need to add braces, you can:
Код:
if(PlayerIsInLobby[playerid]) return SetPlayerHealth(playerid, Float:0x7F800000);
Код:
if(PlayerIsInLobby[playerid] == 1) { SetPlayerHealth(playerid, Float:0x7F800000 ); }