11.04.2011, 09:41
help me guys... something wrong with my anti money hack...
i use servermoneyGM.inc
i have a problem like this:
-i have 5000$ in game
then i go to Payn'Spray.. after the car have been fixed,, the money reduce to 4900$ then back again to 5000$
weird...
the 2nd.
-when i modify a car.. the money same as above.. the money get back again..
the 3rd
-gun shop, and another shop.. same as above ...
very weird...
can any body help me??
the servermoneyGM.inc goes like this
please guys... help me
sorry for my bad english
i use servermoneyGM.inc
i have a problem like this:
-i have 5000$ in game
then i go to Payn'Spray.. after the car have been fixed,, the money reduce to 4900$ then back again to 5000$
weird...
the 2nd.
-when i modify a car.. the money same as above.. the money get back again..
the 3rd
-gun shop, and another shop.. same as above ...
very weird...
can any body help me??
the servermoneyGM.inc goes like this
Код:
/************************************************** Name: Server-sided money INC for gamemodes By: X_Cutter Date: Project started 09/2009, rewritten 09/2010 Use: Avoid money hacks Version: 5.0 SA-MP: All versions should work Made for: 0.3b ************************************************** CREDITS: ****** for the y_hooks include Use: Include '#include <servermoneyGM>' to your gamemode RIGHT UNDER '#include <a_samp>'. Also make sure to include '#include <servermoneyFS>' in all your filterscripts RIGHT UNDER '#include <a_samp>'. Use OnPlayerHaveExtraCash(playerid,extramoney) at the bottom of this include to set what happens to a player who might be hacking. *NOTE: Add the YSI folder to your server includes! */ #include <YSI/y_hooks> new SERVERSIDETIMER; new ServerSideCash[MAX_PLAYERS]; Hook:Money_OnGameModeInit() { SERVERSIDETIMER=SetTimer("ServerMoneyCB",1000,true); return 1; } Hook:Money_OnGameModeExit() { KillTimer(SERVERSIDETIMER); return 1; } Hook:Money_OnPlayerConnect(playerid) { ServerSideCash[playerid]=0; } forward ServerMoneyCB(); public ServerMoneyCB() { for(new ServerSidep;ServerSidep<MAX_PLAYERS;ServerSidep++) { if(IsPlayerConnected(ServerSidep)) { if(GetPlayerMoney(ServerSidep) > ServerSideCash[ServerSidep]) { new H4xc4sh=GetPlayerMoney(ServerSidep); H4xc4sh=H4xc4sh-ServerSideCash[ServerSidep]; if(H4xc4sh > 100) OnPlayerHaveExtraCash(ServerSidep,H4xc4sh); } GivePlayerMoney(ServerSidep,-GetPlayerMoney(ServerSidep)); GivePlayerMoney(ServerSidep,ServerSideCash[ServerSidep]); } } return 1; } forward Money_GivePlayerMoney(playerid,cashgiven); public Money_GivePlayerMoney(playerid,cashgiven) { ServerSideCash[playerid]=ServerSideCash[playerid]+cashgiven; return 1; } forward Money_ResetPlayerMoney(playerid); public Money_ResetPlayerMoney(playerid) { ServerSideCash[playerid]=0; return 1; } forward Money_GetPlayerMoney(playerid); public Money_GetPlayerMoney(playerid) { return ServerSideCash[playerid]; } #define GetPlayerMoney Money_GetPlayerMoney #define GivePlayerMoney Money_GivePlayerMoney #define ResetPlayerMoney Money_ResetPlayerMoney // -------------------------------------------------- stock OnPlayerHaveExtraCash(playerid,extramoney) { new CASHSTR[128]; format(CASHSTR,128,"This server is protected from money hacking",extramoney); SendClientMessage(playerid,0xFF0000FF,CASHSTR); return 1; }
sorry for my bad english