23.10.2012, 09:37
or even y_bit... or y_playerarray... and if you really don't want to use anything pre-made because ur so oldsk00l l33t you simply use bit shifting!
And if that's too complicated for you, here is an even easier way!
Isn't that hard.. now is it?
PS: That's pretty much what y_commands does already but you know how oldsk00l people are! They have to have made it themself.
pawn Код:
new n = n << 1
new y = n >> 1
pawn Код:
#define COMMAND_CUFF 1
#define COMMAND_TAZER 2
#define COMMAND_SLAP 4
#define COMMAND_COUGH 8 // notice how each is double of the last?
// in order to assign:
new PlayerPermission = COMMAND_CUFF + COMMAND_SLAP + COMMAND_COUGH; // player can not use TAZER
// In order to check
if(!(COMMAND_TAZER&PlayerPermission))
{
// sry cant use!
}
PS: That's pretty much what y_commands does already but you know how oldsk00l people are! They have to have made it themself.