Just a little help with ZCMD
#1

I tried making a command "/fightstyle [STYLE]"

here is what I attempted, got 3 errors:

pawn Код:
COMMAND:fightstyle(playerid, params[])
    {
      if(IsPlayerConnected(playerid))
      {
        new option;
        if(!sscanf(params, "i", option))
        {
                if(strcmp(option, "normal", true) == 0)
                {
                if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL) return SendClientMessage(playerid,CORAL,"Your fighting style is already normal");
                    else SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL), SendClientMessage(playerid,LIME,"Fighting style set");
                }
                if(strcmp(option, "boxing", true) == 0)
                {
                if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_BOXING) return SendClientMessage(playerid,CORAL,"Your fighting style is already boxing");
                    else SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING), SendClientMessage(playerid,LIME,"Fighting style set");
                }
                if(strcmp(option, "kungfu", true) == 0)
                {
                    if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_KUNGFU) return SendClientMessage(playerid,CORAL,"Your fighting style is already kungfu");
                    else SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU), SendClientMessage(playerid,LIME,"Fighting style set");
                }
                else return SendClientMessage(playerid,CORAL,"Invalid Style");
            }
            else
            {
              SendClientMessage(playerid,CORAL,"USAGE: /fightstyle [STYLE]");
              SendClientMessage(playerid,CORAL,"STYLES: normal boxing kungfu");
              return 1;
            }
        }
        else return 0;
        return 1;
    }
Thank you.
Reply


Messages In This Thread
Just a little help with ZCMD - by pagie1111 - 27.12.2009, 23:24
Re: Just a little help with ZCMD - by Correlli - 27.12.2009, 23:25
Re: Just a little help with ZCMD - by pagie1111 - 27.12.2009, 23:27
Re: Just a little help with ZCMD - by Correlli - 27.12.2009, 23:28
Re: Just a little help with ZCMD - by pagie1111 - 27.12.2009, 23:30
Re: Just a little help with ZCMD - by pagie1111 - 28.12.2009, 02:46
Re: Just a little help with ZCMD - by Sergei - 28.12.2009, 07:47
Re: Just a little help with ZCMD - by dice7 - 28.12.2009, 08:41

Forum Jump:


Users browsing this thread: 1 Guest(s)