[Ajuda] Duvida
#5

PHP код:
new Money[MAX_PLAYERS];  
public 
OnPlayerUpdate(playerid// OU TIMER
{
    if(
Money[playerid] != GetPlayerMoney(playerid))  
    {
        
SetPlayerMoney(playerid,Money[playerid]);
    }
    return 
true;  
}  
public 
OnPlayerConnect(playerid)  
{  
    
ResetPlayerMoney(playerid);  
    return 
true;  
}  
  
stock _GivePlayerMoney(playeridvalor)  
{  
    
Money[playerid] += valor;  
    
GivePlayerMoney(playeridvalor);  
    return 
true;  
}  
stock _ResetPlayerMoney(playerid)  
{  
    
Money[playerid] = 0;  
    
ResetPlayerMoney(playerid);  
    return 
true;  
}  
stock SetPlayerMoney(playerid,valor)  
{
    
ResetPlayerMoney(playerid);
    
GivePlayerMoney(playeridvalor);
    return 
true;  
}
#if defined _ALS_GivePlayerMoney
    #undef GivePlayerMoney
#else
    #define _ALS_GivePlayerMoney
#endif
 
#define GivePlayerMoney _GivePlayerMoney
#if defined _ALS_ResetPlayerMoney
    #undef ResetPlayerMoney
#else
    #define _ALS_ResetPlayerMoney
#endif
 
#define ResetPlayerMoney _ResetPlayerMoney 
Reply


Messages In This Thread
Duvida - by LucasDias - 01.06.2015, 14:15
Re: Duvida - by Dayvison_ - 01.06.2015, 14:53
Re: Duvida - by Bruno13 - 01.06.2015, 15:05
Re: Duvida - by LucasDias - 01.06.2015, 16:34
Re: Duvida - by Dayvison_ - 01.06.2015, 17:00
Re: Duvida - by LucasDias - 01.06.2015, 17:26
Re: Duvida - by Dayvison_ - 01.06.2015, 18:42

Forum Jump:


Users browsing this thread: 1 Guest(s)