Command not found
#1

Anyone know how to make this?

So If I do /car or any command that I did not make.

If it's not on the server command list then SendClientMessage " Command not found in the server command list"

I should also take effect with the other filterscripts commands.
Reply
#2

you mean this ?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return SendClientMessage(playerid,-1,"sorry we cant find this command in our gamemode"); //change it to what ever you want
}
Reply
#3

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
you mean this ?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        // Do something here
        return 1;
    }
    return SendClientMessage(playerid,-1,"sorry we cant find this command in our gamemode"); //change it to what ever you want
}
Something like that. I have tried it but no effect. It show's nothing
Reply
#4

Can you show us your OnPlayerCommandText ?
Reply
#5

It's empty. The only I have is that the code you've given me..
Reply
#6

do you make GM yet or its new ? if you already made one show it if you want to.
Reply
#7

If you have "OnPlayerCommandText" in GM and any other FS, those two will mix up, and eventually give you error message on executing correct command from FS and/or GM! I suggest you to remove all commands from all FS's you got and put them to your gamemode!
Reply
#8

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "Command not found in the server command list.");
    return 1;
}
He wanted something like this.
Reply
#9

Quote:
Originally Posted by dannyk0ed
Посмотреть сообщение
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "Command not found in the server command list.");
    return 1;
}
He wanted something like this.
OMG! This is exactly what I need! It works even you have command's in any of your filterscript. +2rep! you save my script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)