is there anything unnecessary in this script?
#2

Nope. Except the fact that you can:

Код:
if(PlayerIsInJizzy[playerid])
Instead of:

Код:
if(PlayerIsInJizzy[playerid] == 1)
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:

Код:
if(PlayerIsInLobby[playerid])
    return SetPlayerHealth(playerid, Float:0x7F800000);
Instead of:

Код:
if(PlayerIsInLobby[playerid] == 1)
{
    SetPlayerHealth(playerid, Float:0x7F800000 );
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)