Question (rep++) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question (rep++) (
/showthread.php?tid=332465)
Question (rep++) -
Join7 - 08.04.2012
I have include for AntiMoneyHack, but I Drift Points. The problem is when people do Drift points, does not give them money because the server has AntiMoneyHack. Can I do so not only detects Drift_Points.pwn, AntiMoneyHack.
Re: Question (rep++) -
Jack.7331 - 08.04.2012
Make a stock to bypass AntiMoneyHack, for example, stock GivePlayerValidMoney(), then you'd do the rest from there.
Re: Question (rep++) -
DaRki007 - 08.04.2012
Include have fuction which is responsible for issuing money,Use her
Re: Question (rep++) -
Join7 - 08.04.2012
#include <AntiMoneyHack> is only my Gamemode.
in FS gone.
And on the other include, is there any ready made.
Re: Question (rep++) -
Join7 - 10.04.2012
up.....
Re: Question (rep++) -
TzAkS. - 10.04.2012
Show us some codes..how is the antimoneyhack?
You need to do like Jack.7331 said
Re: Question (rep++) -
Faisal_khan - 10.04.2012
What are you trying to say? Speak clear.
Re: Question (rep++) -
WarriorEd22 - 10.04.2012
If you have an AntiMoneyHack.inc , you should put
at the top of all your filterscripts that relate or require money. So that means put #include <AntiMoneyHack> at top of your Drift_Points.pwn filterscript right under the #include <a-samp>. That way, the AntiMoneyHack will bypass your Drift Points.
Re: Question (rep++) -
Join7 - 10.04.2012
I put #include <AntiMoneyHack> in my gamemode
Код:
#if defined FILTERSCRIPT
#endinput
#endif
#if defined _moneyhax_included
#endinput
#endif
#define _moneyhax_included
#define CHECK_TIME 30 // in seconds to check if money is equal to the saved one.
new PMoney[MAX_PLAYERS];
forward GetPlayerMonez(playerid);
forward ResetPlayerMonez(playerid);
forward GivePlayerMonez(playerid,money);
forward MoneyCheck();
public MoneyCheck()
{
new money;
#if defined _foreach_included
foreach(Player,playerid)
{
money = GetPlayerMoney(playerid);
if( money < PMoney[playerid] && money > -1 ) PMoney[playerid]=money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,PMoney[playerid]);
}
#else
for(new playerid;playerid<MAX_PLAYERS;playerid++) if(IsPlayerConnected(playerid))
{
money = GetPlayerMoney(playerid);
if( money < PMoney[playerid] && money > -1 ) PMoney[playerid]=money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,PMoney[playerid]);
}
#endif
return 1;
}
public GivePlayerMonez(playerid, money)
{
new rmoney = GetPlayerMoney(playerid);
if( rmoney < PMoney[playerid] && rmoney > -1 ) PMoney[playerid]=rmoney;
PMoney[playerid]+=money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid,PMoney[playerid]);
return 1;
}
public ResetPlayerMonez(playerid)
{
ResetPlayerMoney(playerid);
PMoney[playerid]=0;
return 1;
}
public GetPlayerMonez(playerid) return PMoney[playerid];
#define GivePlayerMoney GivePlayerMonez
#define GetPlayerMoney GetPlayerMonez
#define ResetPlayerMoney ResetPlayerMonez
public OnGameModeInit()
{
SetTimer("MoneyCheck",CHECK_TIME*1000,true);
if (funcidx("moneyhax_OnGameModeInit") != -1)
{
return CallLocalFunction("moneyhax_OnGameModeInit", "");
}
return 1;
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit moneyhax_OnGameModeInit
forward moneyhax_OnGameModeInit();
public OnPlayerConnect(playerid)
{
PMoney[playerid]=0;
if (funcidx("moneyhax_OnPlayerConnect") != -1)
{
return CallLocalFunction("moneyhax_OnPlayerConnect", "i", playerid);
}
return 1;
}
#if defined _ALS_OnPlayerConnect
#undef OnPlayerConnect
#else
#define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect moneyhax_OnPlayerConnect
forward moneyhax_OnPlayerConnect(playerid);
Re: Question (rep++) -
WarriorEd22 - 10.04.2012
It's very simple. For example:
pawn Код:
#include <a-samp>
#include <AntiMoneyHack>
#define COLOR_RED .......
#define ...... .......
Unless you don't have a AntiMoneyHack.inc?