I have a question.
#8

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
Well... An if or else statement can be used without "{ }" if it has just one line, so I believe this form:

PHP код:
if(!IsPlayerAdmin(playerid))
    return 
SendClientMessage(playerid, -1"Insufficient permissions."); 
is neater than this one:

PHP код:
if(!IsPlayerAdmin(playerid))
{
    return 
SendClientMessage(playerid, -1"Insufficient permissions.");

I really don't care how anyone does it but he made it sound as the second form was somehow wrong, whatever it takes to make a code look more clear is what i'll go for that's why i actually encourage the second form. More lines doesn't mean less processing speed...

Quote:
Originally Posted by TheToretto
Посмотреть сообщение
PHP код:
new bool:VIP[MAX_PLAYERS]; 
And since you've mentioned the usage of the useless bool tag while you're at it might aswell put char arrays in use since it's going to be accepting 1's and 0's (Not that the char array is going to limit it to that) but helps save a bit more.

pawn Код:
new bool:VIP[MAX_PLAYERS char];
And access them using {} instead of [].

pawn Код:
VIP{playerid} = true;
Reply


Messages In This Thread
I have a question. - by murilo2929 - 28.10.2018, 16:16
Re: I have a question. - by d3Pedro - 28.10.2018, 17:47
Re: I have a question. - by KinderClans - 28.10.2018, 21:01
Re: I have a question. - by TheToretto - 28.10.2018, 21:16
Re: I have a question. - by RogueDrifter - 28.10.2018, 21:22
Re: I have a question. - by TheToretto - 28.10.2018, 21:38
Re: I have a question. - by murilo2929 - 28.10.2018, 21:41
Re: I have a question. - by RogueDrifter - 28.10.2018, 22:10
Re: I have a question. - by KinderClans - 28.10.2018, 22:30
Re: I have a question. - by d3Pedro - 29.10.2018, 03:47

Forum Jump:


Users browsing this thread: 3 Guest(s)