Commands help.
#1

Hi everybody, i enter on server and type every cmd (from OnPlayerCommandText, other ones works) and it says me
Код:
SERVER: Unknown Command.
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
....commands....  
    return 0;
}
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
....commands....  
    return 1;
}
If you want to stop SERVER: Unknown Command. If you enter wrong command, nothing will happen.
Reply
#3

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    // Bla bla
    return 1;
}
Only use return 0; at the end of the call back, like your last command, for example:
pawn Код:
if(strcmp(cmdtext, "/command",true))
    {
       // Bla bla
       return 1;
    }
    else if(!strcmp(cmdtext, "/command", true))
    {
        // Bla bla
        return 1;
    }
    return 0;
}
Reply
#4

thats what i use :/
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/command", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return 1;
}
Reply
#6

do you use any other command processor?

if yes convert all strcmp to your command processor

+rep if i helped
Reply
#7

Show me what you have at includes xD
Reply
#8

Код:
#include <       a_samp         >
#include <       streamer       >
#include <       zcmd           >
#include <       sscanf         >
return 0, return 1. Same shit.
Reply
#9

Quote:
Originally Posted by Domnic Toretto
Посмотреть сообщение
do you use any other command processor?

if yes convert all strcmp to your command processor

+rep if i helped
I don't use other, just this.
Reply
#10

Remove #include zcmd ..
If you don't use it..
You can't use strcmp and zcmd in the same script !
Just dcmd and strcmp !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)