[Pedido] Anti Money Hack - 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: [Pedido] Anti Money Hack (
/showthread.php?tid=282935)
[Pedido] Anti Money Hack -
[N]inja - 13.09.2011
Bom, estou tentando colocar um anti money hack no meu gamemode, sу que nгo achei nenhum funcional
alguйm poderia me indicar um?
Re: [Pedido] Anti Money Hack -
diretor7 - 13.09.2011
http://forum.sa-mp.com/showthread.ph...ght=anti-money
Re: [Pedido] Anti Money Hack -
MiTToS - 13.09.2011
Usa o meu, nгo usa nenhum timer ou coisa do gкnero, simples, fбcil e rбpido.
EDIT: Esqueci do link xD
https://sampforum.blast.hk/showthread.php?tid=276421
Re: [Pedido] Anti Money Hack -
Sergio_MOW - 13.09.2011
USA O SEARCH :
https://sampforum.blast.hk/showthread.php?tid=130458
https://sampforum.blast.hk/showthread.php?tid=251337
https://sampforum.blast.hk/showthread.php?tid=189607
https://sampforum.blast.hk/showthread.php?tid=163938
https://sampforum.blast.hk/showthread.php?tid=72500
Tenso mano, NUNCA POSTE PRIMEIRO, SEMPRE use o search antes de postar, ISSO Й REGRA!
Re: [Pedido] Anti Money Hack -
Shadoww5 - 13.09.2011
PHP код:
#include <dini>
new Dinheiro[MAX_PLAYERS];
public OnGameModeInit()
{
if(!fexist("Dinheiro.txt")) dini_Create("Dinheiro.txt");
SetTimer("Check", 750, true);
return 1;
}
public OnPlayerConnect(playerid)
{
new sStr[MAX_PLAYER_NAME];
GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
ResetPlayerMoney(playerid);
Dinheiro[playerid] = dini_Int("Dinheiro.txt", sStr);
GivePlayerMoney(playerid, Dinheiro[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new sStr[MAX_PLAYER_NAME];
GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
dini_IntSet("Dinheiro.txt", sStr, Dinheiro[playerid]);
return 1;
}
forward Check();
public Check()
{
for(new i, p = GetMaxPlayers(); i < p; i ++)
{
if(!IsPlayerConnected(i) || Dinheiro[i] == GetPlayerMoney(i)) continue;
ResetPlayerMoney(i);
GivePlayerMoney(i, Dinheiro[i]);
}
return 1;
}
stock GivePlayerCash(playerid, money)
{
Dinheiro[playerid] += money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, Dinheiro[playerid]);
return 1;
}
stock ResetPlayerCash(playerid)
{
Dinheiro[playerid] = 0;
ResetPlayerMoney(playerid);
return 1;
}
stock GetPlayerCash(playerid) return Dinheiro[playerid];
OBS: Lembre-se de trocar todos os GivePlayerMoney por GivePlayerCash, ResetPlayerMoney por ResetPlayerCash e GetPlayerMoney por GetPlayerCash.
Re: [Pedido] Anti Money Hack -
Vai_Besta - 13.09.2011
Procure um
Re: [Pedido] Anti Money Hack -
StrondA_ - 13.09.2011
Ninja, nem se estressa em fazer ediзхes, use este: https://sampforum.blast.hk/showthread.php?tid=251337
vocк apenas vai colocar a include e fazer as seguintes modificaзхes:
Passo 1: Substitua GivePlayerMoney por PC_DarDinheiro
Passo 2: Substitua GetPlayerMoney por PC_GetarDinheiro
Passo 3: Substitua ResetPlayerMoney por PC_ResetarDinheiro
Passo 4: Adicione a funзгo PC_AtualizarDinheiro(playerid); na public OnPlayerUpdate(playerid)
Re: [Pedido] Anti Money Hack -
[O.z]Caroline - 13.09.2011
Quote:
Originally Posted by Shadoww5
PHP код:
#include <dini>
new Dinheiro[MAX_PLAYERS];
public OnGameModeInit()
{
if(!fexist("Dinheiro.txt")) dini_Create("Dinheiro.txt");
SetTimer("Check", 750, true);
return 1;
}
public OnPlayerConnect(playerid)
{
new sStr[MAX_PLAYER_NAME];
GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
ResetPlayerMoney(playerid);
Dinheiro[playerid] = dini_Int("Dinheiro.txt", sStr);
GivePlayerMoney(playerid, Dinheiro[playerid]);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new sStr[MAX_PLAYER_NAME];
GetPlayerName(playerid, sStr, MAX_PLAYER_NAME);
dini_IntSet("Dinheiro.txt", sStr, Dinheiro[playerid]);
return 1;
}
forward Check();
public Check()
{
for(new i, p = GetMaxPlayers(); i < p; i ++)
{
if(!IsPlayerConnected(i) || Dinheiro[i] == GetPlayerMoney(i)) continue;
ResetPlayerMoney(i);
GivePlayerMoney(i, Dinheiro[i]);
}
return 1;
}
stock GivePlayerCash(playerid, money)
{
Dinheiro[playerid] += money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, Dinheiro[playerid]);
return 1;
}
stock ResetPlayerCash(playerid)
{
Dinheiro[playerid] = 0;
ResetPlayerMoney(playerid);
return 1;
}
stock GetPlayerCash(playerid) return Dinheiro[playerid];
OBS: Lembre-se de trocar todos os GivePlayerMoney por GivePlayerCash, ResetPlayerMoney por ResetPlayerCash e GetPlayerMoney por GetPlayerCash.
|
pawn Код:
SetTimer("Check", 750, true);
achei este tutorial em portuguкs:
http://forum.sa-mp.com/showthread.ph...13#post1277813