Simple command problem
#1

Whenever I type /smoke 1 or /smoke 2 or 3 in-game, I get an error message that it's an unknown command. I have /aim command that's made in the exactly the same way, and it works great. Can someone help me out please?

pawn Код:
if (strcmp("/smoke", cmdtext, true) == 0)
    {
        if(pCriticallyInjured[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] Critically injured!");
        if(!IsPlayerInAnyVehicle(playerid))
        {
            if (!strlen(cmdtext[9])) return SendClientMessage(playerid,COLOR_USAGE,"[USAGE:] /smoke [1-3]");
            switch (cmdtext[9])
            {
                case '1': ApplyAnimation(playerid,"SMOKING", "M_smklean_loop", 4.0, 1, 0, 0, 0, 0);
                case '2': ApplyAnimation(playerid,"SMOKING", "F_smklean_loop", 4.0, 1, 0, 0, 0, 0);
                case '3': ApplyAnimation(playerid,"SMOKING", "M_smkstnd_loop", 4.0, 1, 0, 0, 0, 0);
                default: SendClientMessage(playerid,COLOR_USAGE,"[USAGE:] /smoke [1-3]");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_ORANGE, "[ERROR:] Not possible in a vehicle.");
        }
        return 1;
    }
Reply


Messages In This Thread
Simple command problem - by Makaveli93 - 03.08.2012, 15:36
Re: Simple command problem - by [MM]RoXoR[FS] - 03.08.2012, 15:43
Re: Simple command problem - by Makaveli93 - 03.08.2012, 15:46
Re: Simple command problem - by [MM]RoXoR[FS] - 03.08.2012, 15:56
Re: Simple command problem - by Makaveli93 - 03.08.2012, 15:59
Re: Simple command problem - by [MM]RoXoR[FS] - 03.08.2012, 16:36

Forum Jump:


Users browsing this thread: 1 Guest(s)