Samp or scripting bug?
#2

Quote:
Originally Posted by Roko_foko
Посмотреть сообщение
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.
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;
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.
I think I don't understand your problem completely. So you have this /std command and if you delete it temporally, then the stuff with the commands works?
Reply


Messages In This Thread
Samp or scripting bug? - by Roko_foko - 25.07.2012, 13:21
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 13:55
Re: Samp or scripting bug? - by TheDeath - 25.07.2012, 13:57
Re: Samp or scripting bug? - by Roko_foko - 25.07.2012, 13:59
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 14:05
Re: Samp or scripting bug? - by Roko_foko - 25.07.2012, 14:10
Re: Samp or scripting bug? - by DeathOnaStick - 25.07.2012, 14:14

Forum Jump:


Users browsing this thread: 3 Guest(s)