[Ajuda] /dardinheiro bugado
#3

ESSE COMANDO Й DE GM TRUCKING APROVEITE !!!


PHP код:
COMMAND:pagar(playeridparams[])
{
    new 
Msg[128], Name[24], OtherName[24], OtherPlayerMoney;
    
// Send the command to all admins so they can see it
    
SendAdminText(playerid"/pagar"params);
    
// Check if the player has logged in
    
if (APlayerData[playerid][LoggedIn] == true)
    {
        if (
sscanf(params"ui"OtherPlayerMoney)) SendClientMessage(playerid0xFF0000AA"Use: /pagar [id] [quantia]");
        else
        {
            
// Check if the otherplayer is online
            
if (IsPlayerConnected(OtherPlayer))
            {
                
// Get the player-names
                
GetPlayerName(playeridNamesizeof(Name));
                
GetPlayerName(OtherPlayerOtherNamesizeof(OtherName));
                
// Check if the money has a positive value (to prevent stealing money using negative values)
                
if (Money 0)
                {
                    
// Check if the player has enough money
                    
if (APlayerData[playerid][PlayerMoney] >= Money)
                    {
                        
// Transfer the money
                        
RewardPlayer(playerid, -Money0);
                        
RewardPlayer(OtherPlayerMoney0);
                        
// Let the other player know that he has received money
                        
format(Msg128"{00FF00} [UDC] Vocк recebeu {FFFFff}R$%i{00FF00}  de {FFFFff}%s."MoneyName);
                        
SendClientMessage(OtherPlayer0xFFFFFFFFMsg);
                        
// Let the player know he gave money to somebody else
                        
format(Msg128"{00FF00} [UDC] Vocк deu {FFFFff}R$%i{00FF00}  para {FFFFff}%s."MoneyOtherName);
                        
SendClientMessage(playerid0xFFFFFFFFMsg);
                        
// Save the player-stats
                        
PlayerFile_Save(playerid);
                        
PlayerFile_Save(OtherPlayer);
                    }
                    else
                        
SendClientMessage(playerid0xFFFFFFFF"{FF0000}[UDC] Vocк nгo tem dinheiro suficiente.");
                }
                else
                    
SendClientMessage(playerid0xFFFFFFFF"{FF0000}[UDC] Vocк deve usar valores maiores que 0.");
            }
            else
                
SendClientMessage(playerid0xFFFFFFFF"{FF0000}[UDC] Esse jogador nгo estб online.");
        }
    }
    else
        return 
0;
    
// Let the server know that this was a valid command
    
return 1;

Reply


Messages In This Thread
/dardinheiro bugado - by gabrielloko157 - 05.12.2012, 09:21
Re: /dardinheiro bugado - by Delete_ - 05.12.2012, 11:35
Re: /dardinheiro bugado - by O_mestre - 05.12.2012, 20:05
Respuesta: /dardinheiro bugado - by gabrielloko157 - 05.12.2012, 21:14
Re: /dardinheiro bugado - by DexterBR - 05.12.2012, 23:19
Re: /dardinheiro bugado - by DexterBR - 05.12.2012, 23:24
Re: /dardinheiro bugado - by lukas_loky - 05.12.2012, 23:28
Respuesta: /dardinheiro bugado - by gabrielloko157 - 06.12.2012, 00:55
Re: /dardinheiro bugado - by perotinhu - 18.03.2013, 23:26
Respuesta: /dardinheiro bugado - by Pedro Pawno - 18.03.2013, 23:43

Forum Jump:


Users browsing this thread: 1 Guest(s)