[Ajuda] Remover Cash
#1

Iae, to com um problema que nгo estou consequindo resolver...
Adaptei um FS do Kasura de cash
pastebin.com/j23XZH9D
ele tem os comandos, /addcash, /setcash e tals, mas nгo to consequiando retirar esse cash como se fosse dinheiro, a unica alternativa retirar cash e sendo pelo admin, estudei o fs tentei mil vezes mas ta osso. kkk"
Irei dar um exemlo de comando
pawn Код:
if(strcmp(cmd, "/comprarcolete", true) == 0)
    {
        GivePlayerMoney(playerid, -40);//Funзгo para retirar o cash
        SetPlayerArmour(playerid, 100);
        return 1;
    }
Include SCash usada na FS
pawn Код:
#include <a_samp>
#include <Dini>

new CashPoints[MAX_PLAYERS];

stock CriarCashInfo()
{
if(!fexist("CashSistem.log")) dini_Create("CashSistem.log");
return 1;
}

stock LoadCashInfo(playerid)
{
if(dini_Isset("CashSistem.log",PlayerName(playerid))) CashPoints[playerid] = dini_Int("CashSistem.log",PlayerName(playerid));
return 1;
}

stock SalvarCash(playerid)
{
dini_IntSet("CashSistem.log",PlayerName(playerid),CashPoints[playerid]);
return 0;
}

stock ResetarCash(playerid)
{
CashPoints[playerid] = 0;
return 1;
}


stock SetarCash(playerid,Cash)
{
CashPoints[playerid]=Cash;
return 1;
}

stock AddCash(playerid,Cash)
{
CashPoints[playerid]+=Cash;
return 1;
}

stock TirarCash(playerid,Cash)
{
CashPoints[playerid]-=Cash;
return 1;
}

stock CashInfo(playerid)
{
new Cash;
Cash = CashPoints[playerid];
return Cash;
}
Reply


Messages In This Thread
Remover Cash - by BaianoIn - 26.09.2013, 19:06
Re: Remover Cash - by zSuYaNw - 26.09.2013, 19:14
Re: Remover Cash - by HatedS - 26.09.2013, 19:14
Re: Remover Cash - by BaianoIn - 26.09.2013, 19:29
Re: Remover Cash - by zSuYaNw - 26.09.2013, 20:01
Re: Remover Cash - by BaianoIn - 26.09.2013, 20:31

Forum Jump:


Users browsing this thread: 1 Guest(s)