Invalid command message?
#1

Is it possible to make an Invalid Command message when using Strcmp as a command base?
Reply
#2

Quote:
Originally Posted by seanny
Посмотреть сообщение
Is it possible to make an Invalid Command message when using Strcmp as a command base?
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( !strcmp( "/mycommand", cmdtext, true, 10 ) )
    {
        // Do something here
        return 1;
    }
    return SendClientMessage( playerid, -1, "INVALID COMMAND" ); // change return 0; to return SendClientMessage( ... );
}
I guess you want this

Hope this helps?

Regards,
FalconX
Reply
#3

Quote:
Originally Posted by FalconX
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText( playerid, cmdtext[ ] )
{
    if ( !strcmp( "/mycommand", cmdtext, true, 10 ) )
    {
        // Do something here
        return 1;
    }
    return SendClientMessage( playerid, -1, "INVALID COMMAND" ); // change return 0; to return SendClientMessage( ... );
}
I guess you want this

Hope this helps?

Regards,
FalconX
OK, I'll give it a go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)