Which is better?
#1

pawn Код:
CMD:heal(playerid, params[])
{
    if(InDM[playerid] == 1) return SCM(playerid, -1, "You cannot heal yourself in DM Arena");
    SetPlayerHealth(playerid, 100);
    return 1;
}

CMD:heal(playerid, params[])
{
    if(InDM[playerid] == 0)
    {
        SetPlayerHealth(playerid, 100);
    }
    else
    {
        SCM(playerid, -1, "You cannot heal yourself in DM Arena");
    }
}
which type of code is better among the above two^ ^
Reply
#2

pawn Код:
CMD:heal(playerid, params[]){    if(InDM[playerid] == 0)    {        SetPlayerHealth(playerid, 100);    }    else    {        SCM(playerid, -1, "You cannot heal yourself in DM Arena");    }}
Reply
#3

the first one
Reply
#4

The first one, and use a bool instead
Reply
#5

I prefer first one.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)