Error format..
#4

The "SERVER: Unknown command." message?

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    // other commands..
    if(!strcmp(cmdtext, "/cursa", true))
    {
        if(cursa[playerid] == 1)
        {
            new Str[400];
            format(Str, sizeof(Str), "\n{FFFFFF}** {50AC40}Transporti: {815FDC}%s\n\n{FFFFFF}** {50AC40}Incarci marfa la {815FDC}%d\n\n{FFFFFF}** {50AC40}Descarci marfa la {815FDC}%d\n\n",
            MisiuneInfo[playerid][mMarfa], MisiuneInfo[playerid][mLoadp], MisiuneInfo[playerid][mUnloadp]);
            ShowPlayerDialog(playerid, CURSA, DIALOG_STYLE_MSGBOX, "{FFFFFF}Informatii cursa", Str, "Ok", "");
            format(string, sizeof(string), "{FFFFFF}[{DD0000}CMD{FFFFFF}] {50AC40}%s {B1BBBE}a folosit {FFFFFF}'{815FDC}/cursa{FFFFFF}'.", sendername);
            SAM(c_alb, string);
        }
        else SCM(playerid, c_alb, "{FFFFFF}[{815FDC}System{FFFFFF}] {50AC40}Nu ai inceput vreo cursa{FFFFFF}.");
        return 1;
    }
    // other commands..
    return 0;
}
strcmp is slow though, ZCMD or y_commands is recommended.
Reply


Messages In This Thread
Error format.. - by [RO]Five - 26.12.2013, 11:20
Re: Error format.. - by Konstantinos - 26.12.2013, 11:33
Re: Error format.. - by [RO]Five - 26.12.2013, 11:44
Re: Error format.. - by Konstantinos - 26.12.2013, 11:49
Re: Error format.. - by [RO]Five - 26.12.2013, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)