SA-MP Forums Archive
[Ajuda] Converter comandos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Converter comandos (/showthread.php?tid=452026)



Converter comandos - Forrest - 19.07.2013

Galera queria saber se alguйm sabe como converter esse comandos de cmd, para strcmd e se da para ajudar.

Код:
CMD:banco(playerid,params[]) return SetPlayerPos(playerid,2305.6309,-16.1295,26.7496);
    //--------------------------------------------------------------------------
CMD:depositar(playerid,params[])
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
        {
            ShowPlayerDialog(playerid,666,DIALOG_STYLE_INPUT,"banco",quantidade,"ok","fechar");
        }
        else return SendClientMessage(playerid,-1,falso);
        return 1;
    }
    //--------------------------------------------------------------------------
CMD:sacar(playerid,params[])
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
        {
            ShowPlayerDialog(playerid,665,DIALOG_STYLE_INPUT,"banco",quantidade,"ok","fechar");
        }
        else return SendClientMessage(playerid,-1,falso);
        return 1;
    }
    //--------------------------------------------------------------------------
CMD:saldo(playerid,params[])
    {
        if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
        {
            GetPlayerName(playerid,nome,24);
            format(arquivo,28,account,nome);
            format(paramount,50,"vocк ainda tem depositado R$%d",DOF2_GetInt(arquivo, "grana"));
            ShowPlayerDialog(playerid,664,DIALOG_STYLE_MSGBOX,"banco",paramount,"ok","");
            return 1;
        }
        else return SendClientMessage(playerid,-1,falso);
    }



Re: Converter comandos - Leopawno - 19.07.2013

Manda seu code todo aew


Respuesta: Converter comandos - Parka - 19.07.2013

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/depositar", true))
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
     {
    ShowPlayerDialog(playerid,666,DIALOG_STYLE_INPUT,"banco",quantidade,"ok","fechar");
    }
    else return SendClientMessage(playerid,-1,falso);
    return 1;
    }

    if(!strcmp(cmdtext, "/banco", true))
    {
    SetPlayerPos(playerid,2305.6309,-16.1295,26.7496);
    return 1;
    }

    if(!strcmp(cmdtext, "/sacar", true))
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
    {
    ShowPlayerDialog(playerid,665,DIALOG_STYLE_INPUT,"banco",quantidade,"ok","fechar");
    }
    else return SendClientMessage(playerid,-1,falso);
    return 1;
    }


    if(!strcmp(cmdtext, "/saldo", true))
    {
    if(IsPlayerInRangeOfPoint(playerid,5.0,c1) || IsPlayerInRangeOfPoint(playerid,5.0,c2) || IsPlayerInRangeOfPoint(playerid,5.0,c3) || IsPlayerInRangeOfPoint(playerid,5.0,c4))
    {
    GetPlayerName(playerid,nome,24);
    format(arquivo,28,account,nome);
    format(paramount,50,"vocк ainda tem depositado R$%d",DOF2_GetInt(arquivo, "grana"));
    ShowPlayerDialog(playerid,664,DIALOG_STYLE_MSGBOX,"banco",paramount,"ok","");
    }
    return 1;
    }

    return 0;
}



Re: Converter comandos - Forrest - 19.07.2013

Deu certo, valeu

rep