25.07.2012, 13:21
(
Последний раз редактировалось Roko_foko; 25.07.2012 в 14:12.
)
When I type in game /std it shows me 'SERVER: Unknown command.' message, even though it should print 'Server: That command doesn't exist. For list of commands /commands.'
But, once I rename the command in the script as '/abc' it works fine.
I have also a command that does all same as /std( /selecttextdraw) and it works fine.
Maybe usefull notes:
- this command worked fine for me before 3 weeks. Since then I didn't use it and now found it doesn't work.
- there is not any other command that starts with /std..
- there is no 'return 0' in OnCommandText
- when I putted printf("Hi"); inside /std it didn't show.
- if I type any other commands that doesn't exist it will show "Server: That command doesn't exist. For list of commands /commands.", but if I type /std it shows SERVER: Unknown command".
- Tried, not work:
But, once I rename the command in the script as '/abc' it works fine.
I have also a command that does all same as /std( /selecttextdraw) and it works fine.
pawn Код:
if(!strcmp(cmdtext,"/std",true,4) && !cmdtext[4])
{
CancelSelectTextDraw(playerid);
SelectTextDraw(playerid, COLOR_YELLOW);
return 1;
}
if(!strcmp(cmdtext,"/selecttextdraw",true,15) && !cmdtext[15] )
{
CancelSelectTextDraw(playerid);
SelectTextDraw(playerid, COLOR_YELLOW);
return 1;
}
//...
SendClientMessage(playerid,COLOR_GREEN2,"Server: That command doesn't exist. For list of commands /commands.");
return 1;
- this command worked fine for me before 3 weeks. Since then I didn't use it and now found it doesn't work.
- there is not any other command that starts with /std..
- there is no 'return 0' in OnCommandText
- when I putted printf("Hi"); inside /std it didn't show.
- if I type any other commands that doesn't exist it will show "Server: That command doesn't exist. For list of commands /commands.", but if I type /std it shows SERVER: Unknown command".
- Tried, not work:
pawn Код:
if( (!strcmp(cmdtext,"/selecttextdraw",true,15) && !cmdtext[15] ) || (!strcmp(cmdtext,"/std",true,4) && !cmdtext[4]) )
{
CancelSelectTextDraw(playerid);
SelectTextDraw(playerid, COLOR_YELLOW);
return 1;
}
//...
SendClientMessage(playerid,COLOR_GREEN2,"Server: That command doesn't exist. For list of commands /commands.");
return 1;