[Ajuda] Dinheiro
#1

Dinheiro nao carrega me ajudem pf
Reply
#2

Como assim o dinheiro nгo carrega amigo??
Tenta fazer uma demonstraзгo fala oque esta acontecendo
Reply
#3

Cria um sistema de salvamento e salva o dinheiro com GetPlayerMoney.
Apos ele logar, carregue o dinheiro dele e usa GivePlayerMoney pra dб a grana.

Use uma das includes de salvamento: Dini, bCini, DOF2, MySQL, bINI, YSI.
Reply
#4

PHP код:
public OnPlayerConnect(playerid)
{
    new 
file[255], aname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridanamesizeof(aname));
    
format(filesizeof(file), "/%s.ini"aname);
    if(
dini_Exists(file))
    {
        
GivePlayerMoney(playeriddini_Get(file"Dinheiro"));
    }
    else
    {
        
dini_Create(file);
    }
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    new 
file[255], aname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridanamesizeof(aname));
    
format(filesizeof(file), "/%s.ini"aname);
    if(
dini_Exists(file))
    {
        
dini_IntSet(file"Dinheiro"GetPlayerMoney(playerid));
    }
    else
    {
        
dini_Create(file);
        
dini_IntSet(file"Dinheiro"GetPlayerMoney(playerid));
    }
    return 
1;

Reply
#5

Obs.: Isso aqui - SetPlayerMoney - nгo existe nas funзхes nativas do SA-MP...

@topic

Quando vocк estiver com uma dъvida, exemplifique ao mбximo e explique-a, caso contrбrio, nгo conseguiremos ajuda-lo.
Reply
#6

Quote:
Originally Posted by Seidel
Посмотреть сообщение
Obs.: Isso aqui - SetPlayerMoney - nгo existe nas funзхes nativas do SA-MP...
HUSAHSUAHUSAH й que eu estava fazendo um FS e usando a funзгo SetPlayerScore, ai acabou passando vlws xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)