#1

I've a doubt which is freaking my mind since this morning.

Imagine i have a /pizza command which works only for pizza boys.

Inside this command i have a params which is called "start" which starts pizza boy job (So player should type /pizza start).

I've added the pizzaboy check (to check if who typed the /pizza command is a pizza boy or no), before the "start" params.

So:

pawn Код:
CMD:pizza(playerid, params[])
(
if(player[playerid][Job] != pizzaboy) return you're not a pizza boy bla bla

if(!strcmp(option, "start"))
{
//Start pizza job
}
return 1;
)
My doubt is, will this check work even with /pizza start? Or is limited to /pizza only?

Ex: I'm not a pizzaboy but if i do /pizza start, will i start the pizza boy job?
Reply
#2

Why don't you try urself?
Reply
#3

Because i'm in bed now and turned off my pc already.
Reply
#4

The permission check has return value. So, it will return the command with error if the player is not a pizza boy.
Reply
#5

Make the check after checking he typed 'start', so basically above your "//start pizza job".
Reply
#6

Quote:
Originally Posted by UFF
Посмотреть сообщение
The permission check has return value. So, it will return the command with error if the player is not a pizza boy.
So it will work for whole command?
Reply
#7

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
So it will work for whole command?
Yeah it will work. Since, I already have a command like that with permission in my script.
Reply
#8

Yeah, tried now. It works, thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)