Params not working.
#5

Hmm, you'll need a different approach when doing a command like this. First of

pawn Код:
if(strcmp(params, "create", true)==0) gangcmd = 1;
    else if(strcmp(params, "invite", true)==0) gangcmd = 2;
    else if(strcmp(params, "join", true)==0) gangcmd = 3;
    else if(strcmp(params, "quit", true)==0) gangcmd = 4;
When you type "/gang create somename", then 'params' holds the value "create somename", that's why you'll need to fix your strcmps to compare just the first x letters of 'params'.

About the not showing usage lines, this should work now
pawn Код:
if(gangcmd < 3 && !params[7]) {
That will check if there was anything typed after "create " or "invite ".

Also, I see you don't actually get the gangs name anywhere
Reply


Messages In This Thread
[UNSOLVED] Params not working. - by Lorenc_ - 24.07.2010, 21:00
Re: Params not working. - by Lorenc_ - 25.07.2010, 07:07
Re: Params not working. - by dice7 - 25.07.2010, 07:25
Re: Params not working. - by Lorenc_ - 25.07.2010, 07:26
Re: Params not working. - by dice7 - 25.07.2010, 07:40
Re: Params not working. - by Lorenc_ - 25.07.2010, 07:53

Forum Jump:


Users browsing this thread: 1 Guest(s)