[Ajuda] Sistema de cofre
#4

pawn Код:
if(strcmp(cmd, "/depositar", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if (PlayerInfo[playerid][pMember] == 5)
        {
            if(!strval(tmp)) return  SendClientMessage(playerid, GetPlayerColor(playerid), "Use /depositar [dinheiro].");
            if(strval(tmp) > GetPlayerMoney(playerid)) return SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo tem essa quantia");
            if(PlayerToPoint(Radioballas, playerid, LugarCofreballas)){
            format(string, sizeof(string), "Vocк depositou: %d.", strval(tmp));
            SendClientMessage(playerid, GetPlayerColor(playerid), string);
            Cofreballas += strval(tmp);
            GivePlayerMoney(playerid,-strval(tmp));
            dini_IntSet("Cofreballas.ini","Cofreballas",Cofreballas);
            } else SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo esta perto do cofre");
        }
        return 1;
    }

    if(strcmp(cmd, "/sacar", true) == 0)
    {
        tmp = strtok(cmdtext, idx);
        if (PlayerInfo[playerid][pLeader] == 5)
        {
            if(!strval(tmp)) return  SendClientMessage(playerid, GetPlayerColor(playerid), "Use /sacar [dinheiro].");
            if(strval(tmp) > Cofreballas) return SendClientMessage(playerid, GetPlayerColor(playerid), "O banco nao tem isso tudo");
            if(PlayerToPoint(Radioballas, playerid, LugarCofreballas)){
            format(string, sizeof(string), "Vocк Sacou: %d.", strval(tmp));
            SendClientMessage(playerid, GetPlayerColor(playerid), string);
            Cofreballas -= strval(tmp);
               GivePlayerMoney(playerid,strval(tmp));
               dini_IntSet("Cofreballas.ini","Cofreballas",Cofreballas);
               }else SendClientMessage(playerid, GetPlayerColor(playerid), "Vocк nгo esta perto do cofre");
        }
        return 1;
    }
Reply


Messages In This Thread
Sistema de cofre - by LeonardoBCF - 23.04.2013, 20:36
Re: Sistema de cofre - by PT - 24.04.2013, 08:13
Re: Sistema de cofre - by LeonardoBCF - 24.04.2013, 16:41
Re: Sistema de cofre - by MatheusAlcapone - 24.04.2013, 16:44
Re: Sistema de cofre - by LeonardoBCF - 24.04.2013, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)