SA-MP Forums Archive
[Ajuda] /setartaxa [ajuda] - 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] /setartaxa [ajuda] (/showthread.php?tid=447318)



/setartaxa [ajuda] - MaTeuS_FeLiPe - 29.06.2013

Olha vim pedir ajuda pra vcs de um comando.Nгo tou conseguindo fazer ele..

Tipo assim:
O prefeito da /setartaxa 2000 ai esse (2000),Quando dava payday. Ai ia pro cofre da PREFEITURA a Grana.


Re: /setartaxa [ajuda] - Gii - 29.06.2013

pawn Код:
new Taxa;

CMD:settaxa(playerid, params[]) {

    if (Prefeito[playerid] != 0 )
        return SendClientMessage(playerid, -1, "Vocк nгo й prefeito!");
       
    if (isnull(params))
        return SendClientMessage(playerid, -1, "Uso correto: /settaxa [Valor]");

    if (0 > strval(params) > 1000)
        return SendClientMessage(playerid, -1, "Valor da taxa deve estar entre R$ 0,00 e R$ 1.000,00!");
       
    Taxa = strval(params);
   
    new Nome[21], cStr[85];
    GetPlayerName(playerid, Nome, 21);
   
    format (cStr, sizeof cStr, "Prefeito %s reajustou o valor da taxa para R$ %i,00!" Nome, Taxa);
    SendClientMessageToAll(-1, cStr);
   
    return true;
}

public PayDay() {

    static i;
    for ( i = GetMaxPlayers() - 1; i > -1; --i ) {

        if (IsPlayerConnected(i)) {

            GivePlayerMoney(i, -Taxa);
            CofreOrg[7][Dinheiro] += Taxa;
        }
    }

}
Requer ajustes.