unknown command but still shows. -
oscar7610 - 08.04.2012
if(!strcmp(cmdtext, "/drink", true))
{
ApplyAnimation(playerid,"BAR","dnk_stndM_loop",4.1 ,1,1,1,1,1,1);
}
if(!strcmp(cmdtext, "/pee", true))
{
ApplyAnimation(playerid,"PAULNMAC","Piss_in",4.1,1 ,1,1,1,1,1);
return 1;
// Returning 1 informs the server that the command has been processed.
// OnPlayerCommandText won't be called in other scripts.
}
return 0;
// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown.
}
example /me looks down
unknown command (but still shows /me) but it shows unknown command.
Re: unknown command but still shows. -
Cjgogo - 08.04.2012
First of all,use [/pawn] tags so we can read better your code,second of all,,I can't understand what you want
Re: unknown command but still shows. -
oscar7610 - 08.04.2012
Look when I type for example /drink the character will make the animation but underneath it types "unknown command" but still the animation is working.
http://imageshack.us/f/845/hellod.png/
Re: unknown command but still shows. -
Cjgogo - 08.04.2012
pawn Код:
if(strcmp(cmdtext, "/drink", true))
{
ApplyAnimation(playerid,"BAR","dnk_stndM_loop",4.1 ,1,1,1,1,1,1);
return 1;
}
if(strcmp(cmdtext, "/pee", true))
{
ApplyAnimation(playerid,"PAULNMAC","Piss_in",4.1,1 ,1,1,1,1,1);
return 1;
}
return 0;
}
Try that,and do this for all commands: you had
,replace it with
,no negation before strcmp
Re: unknown command but still shows. -
oscar7610 - 08.04.2012
why ! is used? I did when I type /drink the help menu pops out.
Re: unknown command but still shows. -
SuperViper - 08.04.2012
Ignore Cjgogo, you need a ! at the beginning of your strcmp.
On topic: You need to have
at the end of EVERY command.
Re: unknown command but still shows. -
Cjgogo - 08.04.2012
SuperViper,problem was fixed,surprisingly by me and another player :P,on another topic,and it's not that I'm a bad scripter,I missunderstood his probleem,:P,and pay more attention to forums,as his problem is fixd on another topic