Command Messed Up
#1

Ok, i have a /stopwork command, but when i enter it, it works fine but says SERVER: Invalid Command. Here it is.
pawn Код:
if(!strcmp("/stopwork", cmdtext, true))
    {
        CancelPlayersCurrentMission(playerid);
        new string[100];
        format(string, sizeof(string),"To start a mission type /work");
        TextDrawShowForPlayer ( playerid, mission [ playerid ] );
        TextDrawSetString(mission [ playerid ],string);
    }
Reply
#2

pawn Код:
if(!strcmp("/stopwork", cmdtext, true))
{
    if(IsPlayerConnected(playerid))
    {
        CancelPlayersCurrentMission(playerid);
        new string[100];
        format(string, sizeof(string),"To start a mission type /work");
        TextDrawShowForPlayer ( playerid, mission [ playerid ] );
        TextDrawSetString(mission [ playerid ],string);
    }
    return 1;
}
Try that
Reply
#3

=D Thankyou so much it worked perfectly!
Reply
#4

Quote:
Originally Posted by Rokzlive
Посмотреть сообщение
=D Thankyou so much it worked perfectly!
If you don't return 1; it(script) thinks that nothing (no command) was found, so it sends that message. Just so you know why that showed.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)