[HELP]Whats wrong In here?
#4

You have to use strtok and cases for /fightstyle _number_ - because there is a space, or just use this instead:

pawn Код:
//=============================Fighting Style Help==============================
    if (strcmp("/fightstyles", cmdtext, true, 5) ==0)
    {
        SendClientMessage(playerid,COLOR_YELLOW,"You can select your fight styles with the command /fightstyle <1-6>");
        SendClientMessage(playerid,COLOR_YELLOW,"Availible Fight Styles:");
        SendClientMessage(playerid,COLOR_YELLOW,"Boxing-1, Kung-Fu-2, Street Fingting-3, Grab-Kick-4, Elbow-4, Normal-5");
        return 1;
    }
//=============================Fighting Styles==================================
    //Boxing
    if (strcmp("/fightstyle1", cmdtext, true, 5) ==0)
    {
        SetPlayerFightingStyle(playerid, 5);
        SendClientMessage(playerid,COLOR_YELLOW,"You have selected the Boxing Fight Style!");
        return 1;
    }
    //Kung-Fu
    if (strcmp("/fightstyle2", cmdtext, true, 5) ==0)
    {
        SetPlayerFightingStyle(playerid, 6);
        SendClientMessage(playerid,COLOR_YELLOW,"You have selected the Kung-Fu Fight Style!");
        return 1;
    }
Use: /fightstyle1 and /fightstyle2 instead
Reply


Messages In This Thread
[HELP]Whats wrong In here? - by OldDirtyBastard - 03.08.2010, 10:31
Re: [HELP]Whats wrong In here? - by Hiddos - 03.08.2010, 10:34
Re: [HELP]Whats wrong In here? - by Koruda - 03.08.2010, 10:35
Re: [HELP]Whats wrong In here? - by Ash. - 03.08.2010, 10:35
Re: [HELP]Whats wrong In here? - by Hiddos - 03.08.2010, 10:36
Re: [HELP]Whats wrong In here? - by OldDirtyBastard - 03.08.2010, 11:00

Forum Jump:


Users browsing this thread: 1 Guest(s)