SA-MP Forums Archive
[Ajuda] /dardinheiro bugado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] /dardinheiro bugado (/showthread.php?tid=397493)



/dardinheiro bugado - gabrielloko157 - 05.12.2012

Код:
CMD:dardinheiro(playerid, params[])
{
	new playa;
	new money;
	new name[MAX_PLAYER_NAME];
	if(sscanf(params, "ri", playa, money))	return SendClientMessage(playerid, COLOR_GRAD2, "Digite: /dardinheiro [id/nome] [quantia]");
	if(PlayerInfo[playerid][pAdmin] >= 1337)
	{
		if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
		{
			SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
			return 1;
		}
		if(IsPlayerConnected(playa))
		{
			if(playa != INVALID_PLAYER_ID)
			{
				ConsumingMoney[playa] = 1;
				GivePlayerMoney(playa, money);
				GetPlayerName(playerid, name, sizeof(name));
				GetPlayerName(playa, Nome, sizeof(Nome));
				format(STR, MAX_STRING, "AdmCMD: O Admin %s estб dando R$%d para %s.", name, money, Nome);
				ABroadCast(COLOR_LIGHTRED, STR, 1);
			}
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб autorizado a usar este comando !");
	}
	return 1;
}

tipo, ta dando o dinheiro mais na msm hora ta tirando o dinheiro


Re: /dardinheiro bugado - Delete_ - 05.12.2012

Tenta:

PHP код:
CMD:dardinheiro(playeridparams[])
{
    new 
playa;
    new 
money;
    new 
name[MAX_PLAYER_NAME];
    if(
sscanf(params"ri"playamoney))    return SendClientMessage(playeridCOLOR_GRAD2"Digite: /dardinheiro [id/nome] [quantia]");
    if(
PlayerInfo[playerid][pAdmin] >= 1337)
    {
        if(
admtrampando[playerid] < && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
        {
            
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб trabalhando! (/trabalhar)");
            return 
1;
        }
        if(
IsPlayerConnected(playa))
        {
            if(
playa != INVALID_PLAYER_ID)
            {
                
ConsumingMoney[playa] = 1;
                
GetPlayerMoney(playa,GivePlayerMoney(playa) +money);
                
GetPlayerName(playeridnamesizeof(name));
                
GetPlayerName(playaNomesizeof(Nome));
                
format(STRMAX_STRING"AdmCMD: O Admin %s estб dando R$%d para %s."namemoneyNome);
                
ABroadCast(COLOR_LIGHTREDSTR1);
            }
        }
    }
    else
    {
        
SendClientMessage(playeridCOLOR_GRAD1"Vocк nгo estб autorizado a usar este comando !");
    }
    return 
1;




Re: /dardinheiro bugado - O_mestre - 05.12.2012

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;




Respuesta: /dardinheiro bugado - gabrielloko157 - 05.12.2012

continua ¬¬ alguem tem algum outro comando ? que funcione .

acho que e o antmoneyhack que ta dando isso


Re: /dardinheiro bugado - DexterBR - 05.12.2012

Coloca // antes de "ConsumingMoney[playa] = 1;" e tenta


Re: /dardinheiro bugado - DexterBR - 05.12.2012

Se nгo der e eu nгo responder rбpido, me manda MP no forum que eu respondo.
Quase toda a parte do tempo eu fico na parte geral, entгo posso nгo ver.


Re: /dardinheiro bugado - lukas_loky - 05.12.2012

Provavelmente й o antmoneyhack mesmo que voce citou... Ve se tem um jeito de driblar ele, alguma funзao tipo SafeGivePlayerMoney


Respuesta: /dardinheiro bugado - gabrielloko157 - 06.12.2012

й so tirar o antmoneyhack do comando, tem como ?


Re: /dardinheiro bugado - perotinhu - 18.03.2013

aqui ta do mesmo jeito.. como arrumo ? ajuda ae mlkada.. !


Respuesta: /dardinheiro bugado - Pedro Pawno - 18.03.2013

Vocк ta usando o ant money?