multiple functions in one "if" line
#1

Hello,

i was wondering if it would be possible to do something like this:
pawn Код:
if(User[playerid][USER_EXP] == 0) return User[playerid][USER_RANK] = 0 (PlayerTextDrawTextSize(playerid, expb[playerid], 222.761901, 0.000000)(UpdateTextDraw(playerid));
but how do i do this properly?
or must it be:
pawn Код:
if(User[playerid][USER_EXP] == 0)
{
    User[playerid][USER_RANK] = 0;
    PlayerTextDrawTextSize(playerid, expb[playerid], 222.761901, 0.000000);
    UpdateTextDraw(playerid); //i have this forwarded (it hides and shows the exp bar to update it)
    return 1;
}
The reason i am asking is because if the first way can be done it will be shorter code.
Reply


Messages In This Thread
multiple functions in one "if" line - by Voxel - 18.11.2013, 13:33
Respuesta: multiple functions in one "if" line - by adri1 - 18.11.2013, 13:39
Re: multiple functions in one "if" line - by Voxel - 18.11.2013, 14:02
Re: multiple functions in one "if" line - by Vince - 18.11.2013, 14:09

Forum Jump:


Users browsing this thread: 2 Guest(s)