SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Tutorials

Reply
 
Thread Tools Display Modes
Old 29/11/2015, 01:42 PM   #161
Sh4d0w2
Big Clucker
 
Sh4d0w2's Avatar
 
Join Date: Sep 2015
Location: Malaysia
Posts: 196
Reputation: 6
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

SOLVED !
PHP Code:
for(new playerid;playerid<MAX_PLAYERS;playerid++) 
Sh4d0w2 is offline   Reply With Quote
Old 31/01/2016, 01:53 PM   #162
SkyFlare
Big Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 107
Reputation: 20
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

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);
__________________
pawn Code:
&#127822;--
             (_)                     (_)                  (_)       \(_)/  
             <) )| I have a PEN    &#127822;( (> I have an APPLE   ~) )~   Ughh  ) )   APPLE PEN
              / \                       / \                    / \          / \
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs
SkyFlare is offline   Reply With Quote
Old 01/02/2016, 09:19 AM   #163
Untonyst
Big Clucker
 
Untonyst's Avatar
 
Join Date: Dec 2015
Posts: 65
Reputation: 9
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

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 
__________________

GitHub account.
Untonyst is offline   Reply With Quote
Old 27/08/2016, 07:10 AM   #164
DandyCorleone
Banned
 
Join Date: May 2016
Posts: 172
Reputation: 3
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

u can help me, to use this script in my gamemodes?
DandyCorleone is offline   Reply With Quote
Old 27/08/2016, 07:37 AM   #165
DandyCorleone
Banned
 
Join Date: May 2016
Posts: 172
Reputation: 3
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

why the my money cash reset to 0?
DandyCorleone is offline   Reply With Quote
Old 11/03/2017, 06:41 AM   #166
ManalShaikh
Little Clucker
 
Join Date: Feb 2017
Posts: 10
Reputation: 0
Default Re: [TUTORIAL] Serverside Money. (Impossible to hack)

Thank you. It's working for me and I'm currently using it.
ManalShaikh is offline   Reply With Quote
Old 20/11/2018, 09:03 AM   #167
JazzGaming
Little Clucker
 
JazzGaming's Avatar
 
Join Date: Oct 2016
Posts: 3
Reputation: 0
Thumbs up Re: [TUTORIAL] Serverside Money. (Impossible to hack)

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();
__________________
JazzGaming is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
anti-money hack versus money hack impossibility(?) maij Help Archive 6 11/08/2010 01:58 AM
[FilterScript] [FS][Tutorial] ServerSide Money Explained viKKmaN Filterscripts 6 16/02/2010 09:40 PM
Serverside Money hacks and Stunt bonuses Eazy_Efolife Help Archive 6 11/02/2010 05:53 PM
Impossible To Hack Money NiGhTWoLFy Help Archive 9 22/07/2009 04:28 PM
Anti-Weapon hack(Serverside Weapons) [IB]Scorcher Help Archive 12 26/06/2009 03:35 AM


All times are GMT. The time now is 05:58 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.