move money hack code to module
This commit is contained in:
parent
39d81a63c7
commit
18eb6c9ca6
@ -23,6 +23,15 @@ static stock
|
|||||||
forward OnPlayerMoneyChanged ( playerid, amount );
|
forward OnPlayerMoneyChanged ( playerid, amount );
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
|
hook OnPlayerUpdate( playerid ) {
|
||||||
|
// reset the player's money if it is inaccurate
|
||||||
|
if ( p_Cash[ playerid ] != GetPlayerMoney( playerid ) ) {
|
||||||
|
ResetPlayerMoney( playerid );
|
||||||
|
GivePlayerMoney( playerid, p_Cash[ playerid ] );
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
hook OnVehicleMod( playerid, vehicleid, componentid )
|
hook OnVehicleMod( playerid, vehicleid, componentid )
|
||||||
{
|
{
|
||||||
switch( componentid )
|
switch( componentid )
|
||||||
|
@ -329,12 +329,6 @@ public OnServerUpdateTimer( )
|
|||||||
ShowPlayerHelpDialog( playerid, 1200, "You have been tied for %s.~n~~n~Your tie is loose.", secondstotime( g_iTime - p_TimeTiedAt[ playerid ] ) );
|
ShowPlayerHelpDialog( playerid, 1200, "You have been tied for %s.~n~~n~Your tie is loose.", secondstotime( g_iTime - p_TimeTiedAt[ playerid ] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Anti Money Hack
|
|
||||||
if ( GetPlayerCash( playerid ) != GetPlayerMoney( playerid ) ) {
|
|
||||||
ResetPlayerMoney( playerid );
|
|
||||||
GivePlayerMoney( playerid, GetPlayerCash( playerid ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 1 )
|
if ( p_AdminLevel[ playerid ] < 1 )
|
||||||
{
|
{
|
||||||
/* ANTICHEAT */
|
/* ANTICHEAT */
|
||||||
|
Loading…
Reference in New Issue
Block a user