unknown command but still shows.
#1

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.
Reply
#2

First of all,use [/pawn] tags so we can read better your code,second of all,,I can't understand what you want
Reply
#3

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/
Reply
#4

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
pawn Код:
if(!strcmp)
,replace it with
pawn Код:
if(strcmp)
,no negation before strcmp
Reply
#5

why ! is used? I did when I type /drink the help menu pops out.
Reply
#6

Ignore Cjgogo, you need a ! at the beginning of your strcmp.

On topic: You need to have

pawn Код:
return 1;
at the end of EVERY command.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)