Just a little help with ZCMD
#7

How is player supposed to use command if he/she isn't connected? Why do you use IsPlayerConnected then ...

pawn Код:
COMMAND:fightstyle(playerid, params[])
{
    new option[10];
    if(!sscanf(params, "s", option);
    {
        if(strcmp(option, "normal", true) == 0)
        {
            if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_NORMAL) SendClientMessage(playerid,CORAL,"Your fighting style is already normal");
            else SetPlayerFightingStyle(playerid, FIGHT_STYLE_NORMAL), SendClientMessage(playerid,LIME,"Fighting style set");
        }
        else if(strcmp(option, "boxing", true) == 0)
        {
            if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_BOXING) SendClientMessage(playerid,CORAL,"Your fighting style is already boxing");
            else SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING), SendClientMessage(playerid,LIME,"Fighting style set");
        }
        else if(strcmp(option, "kungfu", true) == 0)
        {
            if(GetPlayerFightingStyle(playerid) == FIGHT_STYLE_KUNGFU) SendClientMessage(playerid,CORAL,"Your fighting style is already kungfu");
            else SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU), SendClientMessage(playerid,LIME,"Fighting style set");
        }
        else SendClientMessage(playerid,CORAL,"Invalid Style");
    }
    else
    {
        SendClientMessage(playerid,CORAL,"USAGE: /fightstyle [STYLE]");
        SendClientMessage(playerid,CORAL,"STYLES: normal boxing kungfu");
    }
    return 1;
}
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)