[TUTORIAL] Serverside Money. (Impossible to hack)
#41

Thanks, this tutorial is the best! UP!
Reply
#42

Work on my GM .
But not on my FS ..

Pliss, anyone can help me ?
Reply
#43

help me !!!
Reply
#44

Quote:
Originally Posted by VenomMancer
View Post
Work on my GM .
But not on my FS ..

Pliss, anyone can help me ?
Try using PVars to communicate between the FS and the GM.
Reply
#45

Quote:
Originally Posted by Cell_
View Post
Try using PVars to communicate between the FS and the GM.
Done
Now works !!!

I am just press CTRL + H then change GivePlayerMoney with GivePlayerCash & SetPlayerMoney with SetPlayerCash & GetPlayerMoney with GetPlayerCash & ResetPlayerMoney with ResetPlayerCash .

So done
Reply
#46

I use the same serverside money system.
I have a problem. In ingame, it resets players money every second and all the time. What should be the problem?
Reply
#47

great
Reply
#48

Hi great job fist of all, and i'm using it on my gm , however i have a problem , when the players use the mod garages, how can i implement the Callback GivePlayerCash there , like check the amount they spend and then apply ? any ideas please, and thank you in advance.
Reply
#49

This is a very helpful system but he didn't explain most parts of the code properly
Reply
#50

PHP Code:
forward MoneyTimer();
public 
MoneyTimer()
{
    new 
username[MAX_PLAYER_NAME];
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
GetPlayerCash(i) != GetPlayerMoney(i))
            {
                
ResetMoneyBar(i);
                
UpdateMoneyBar(i,GetPlayerCash(i));
                new 
hack GetPlayerMoney(i) - GetPlayerCash(i);
                
GetPlayerName(i,username,sizeof(username));
                
printf("%s has picked up/attempted to spawn $%d."username,hack);
            }
            if(
PlayerInfo[i][Level] > 0)
            {
                new 
stringss[256];
                new 
hack GetPlayerMoney(i) - GetPlayerCash(i);
                
format(stringsssizeof(stringss), "[Money Hack] : %s has spawned $%d"usernamehack);
                
SendClientMessage(playerid,COLOR_PURPLE,stringss);
            }
        }
    }

btw nice bump:/
Reply
#51

SOLVED !
PHP Code:
for(new playerid;playerid<MAX_PLAYERS;playerid++) 
Reply
#52

Quote:
Originally Posted by Sh4d0w2
View Post
SOLVED !
PHP Code:
for(new playerid;playerid<MAX_PLAYERS;playerid++) 
Actually the problem was

Code:
SendClientMessage(playerid,COLOR_PURPLE,stringss);
PlayerID wasn't defined, as it's set to i for all in that Function
so all you needed to do was change it accordingly like below
Code:
SendClientMessage(i,COLOR_PURPLE,stringss);
Reply
#53

From my include [click] ^_^

PHP Code:
#if    !defined AC_MONEY__IGNORE_TIME
    #define    AC_MONEY__IGNORE_TIME (1000)
#endif
static ac_money[MAX_PLAYERS], ac_money__ignore_tick[MAX_PLAYERS];
#if !defined U_ANTI_MONEY_HACK_TROLL_MODE
    
@u_anti_money_hack_Timer();
    @
u_anti_money_hack_Timer(){
    
#if (defined foreach) && (defined Player@YSII_Ag)
        
foreach (new i:Player)
    
#else
        
for (new GetPlayerPoolSize() + 1i-- != 0; ) if (IsPlayerConnected(i))
    
#endif
        
{
            if (
ac_money[i] != GetPlayerMoney(i)){
                if ((
ac_money[i] > GetPlayerMoney(i))
                && (
GetTickCount() > ac_money__ignore_tick[i])){
                    
ac_money[i] = GetPlayerMoney(i);
                }
                else if (
ac_money[i] < GetPlayerMoney(i)){
                    
ResetPlayerMoney(i);
                    
GivePlayerMoney(iac_money[i]);
                
#if defined OnMoneyCheatDetected
                    
OnMoneyCheatDetected(i);
                
#endif
                    
return 0;
                }    
            }
        }
        return 
1;
    }
    public 
OnGameModeInit(){
        
SetTimer("@u_anti_money_hack_Timer"1000true);
    
#if defined ac_money__OnGameModeInit
        
return ac_money__OnGameModeInit();
    
#else
        
return 1;
    
#endif
    
}
    
#if defined _ALS_OnGameModeInit
        #undef OnGameModeInit
    #else
        #define _ALS_OnGameModeInit
    #endif
    #if defined ac_money__OnGameModeInit
    
forward ac_money__OnGameModeInit();
    
#endif
    #define OnGameModeInit ac_money__OnGameModeInit
    
    
public OnFilterScriptInit(){
        
SetTimer("@u_anti_money_hack_Timer"1000true);
        
#if defined ac_money__OnFilterScriptInit
            
return ac_money__OnFilterScriptInit();
        
#else
            
return 1;
        
#endif
    
}
    
#if defined _ALS_OnFilterScriptInit
        #undef OnFilterScriptInit
    #else
        #define _ALS_OnFilterScriptInit
    #endif
    #if defined ac_money__OnFilterScriptInit
    
forward ac_money__OnFilterScriptInit();
    
#endif
    #define OnFilterScriptInit ac_money__OnGameModeInit
#endif
public OnPlayerConnect(playerid){
    
ac_money[playerid] = ac_money__ignore_tick[playerid] = 0;
#if defined ac_money__OnPlayerConnect
    
return ac_money__OnPlayerConnect(playerid);
#else
    
return 1;
#endif
}
#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#if defined ac_money__OnPlayerConnect
forward ac_money__OnPlayerConnect(playerid);
#endif
#define OnPlayerConnect ac_money__OnPlayerConnect
stock ac_money__GivePlayerMoney(playeridmoney){
    
ac_money__ignore_tick[playerid] = GetTickCount() + AC_MONEY__IGNORE_TIME;
    
ac_money[playerid] = money;
    return 
GivePlayerMoney(playeridmoney);
}
#if defined _ALS_GivePlayerMoney
    #undef GivePlayerMoney
#else
    #define _ALS_GivePlayerMoney
#endif
#define GivePlayerMoney ac_money__GivePlayerMoney
static stock u_ac_money__CheckPlayerMoney(playerid){
    if (
ac_money[playerid] != GetPlayerMoney(playerid)){
        if ((
ac_money[playerid] > GetPlayerMoney(playerid))
        && (
GetTickCount() > ac_money__ignore_tick[playerid])){
            
ac_money[playerid] = GetPlayerMoney(playerid);
        }
        else if (
ac_money[playerid] < GetPlayerMoney(playerid)){
            
ResetPlayerMoney(playerid);
            
GivePlayerMoney(playeridac_money[playerid]);
            return 
0;
        } 
    }
    return 
1;
}
stock ac_money__GetPlayerMoney(playerid){
#if defined U_ANTI_MONEY_HACK_TROLL_MODE
    
if (u_ac_money__CheckPlayerMoney(playerid)){
    
#if defined OnMoneyCheatDetected
        
OnMoneyCheatDetected(playerid);
    
#endif
        
return 0;
    }
#endif
    
return ac_money[playerid];
}
#if defined _ALS_GetPlayerMoney
    #undef GetPlayerMoney
#else
    #define _ALS_GetPlayerMoney
#endif
#define GetPlayerMoney ac_money__GetPlayerMoney
stock ac_money__ResetPlayerMoney(playerid){
    
ac_money__ignore_tick[playerid] = GetTickCount() + AC_MONEY__IGNORE_TIME;
    
ac_money[playerid] = 0;
    return 
1;
}
#if defined _ALS_ResetPlayerMoney
    #undef ResetPlayerMoney
#else
    #define _ALS_ResetPlayerMoney
#endif
#define ResetPlayerMoney ac_money__ResetPlayerMoney    
#if defined OnMoneyCheatDetected
forward OnMoneyCheatDetected(playerid);
#endif 
Reply
#54

u can help me, to use this script in my gamemodes?
Reply
#55

why the my money cash reset to 0?
Reply
#56

Thank you. It's working for me and I'm currently using it.
Reply
#57

Quote:

public MoneyTimer()
{
new username[MAX_PLAYER_NAME];
for(new i=0; i<MAX_PLAYE....

"warning 235: public function lacks forward declaration (symbol "MoneyTimer")"


Add this;

forward MoneyTimer();
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)