diff --git a/gamemodes/irresistible/cnr/global.pwn b/gamemodes/irresistible/cnr/global.pwn index 497eb85..e291dfa 100644 --- a/gamemodes/irresistible/cnr/global.pwn +++ b/gamemodes/irresistible/cnr/global.pwn @@ -44,3 +44,6 @@ new g_TopDonorWall = INVALID_OBJECT_ID, g_AlcatrazArea = -1 ; + +/* ** Getters and Setters ** */ +stock GetServerTime( ) return g_iTime; diff --git a/gamemodes/irresistible/cnr/player.pwn b/gamemodes/irresistible/cnr/player.pwn index 5d35be9..9de2382 100644 --- a/gamemodes/irresistible/cnr/player.pwn +++ b/gamemodes/irresistible/cnr/player.pwn @@ -244,3 +244,22 @@ new p_PlayerAltBind [ MAX_PLAYERS ] = { -1, ... }, p_PlayerAltBindTick [ MAX_PLAYERS ] ; + +/* ** Getters And Setters** */ +stock GetPlayerAccountID( playerid ) return p_AccountID[ playerid ]; + +stock GetPlayerVIPLevel( playerid ) return p_VIPLevel[ playerid ]; + +stock IsPlayerInPaintBall( playerid ) return p_inPaintBall{ playerid }; + +stock IsPlayerMovieMode( playerid ) return p_inMovieMode{ playerid }; + +stock GetPlayerAdminLevel( playerid ) return p_AdminLevel[ playerid ]; + +stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid }; + +stock IsPlayerJailed( playerid ) return p_Jailed{ playerid }; + +stock IsPlayerAdminOnDuty( playerid ) return p_AdminOnDuty{ playerid }; + +stock IsPlayerSpawnProtected( playerid ) return p_AntiSpawnKillEnabled{ playerid }; diff --git a/gamemodes/irresistible/features/gangs/gangs.pwn b/gamemodes/irresistible/features/gangs/gangs.pwn index b79c7a2..0a6c695 100644 --- a/gamemodes/irresistible/features/gangs/gangs.pwn +++ b/gamemodes/irresistible/features/gangs/gangs.pwn @@ -16,6 +16,7 @@ /* ** Macros ** */ #define IsGangPrivate(%0) ( g_gangData[ %0 ] [ E_INVITE_ONLY ] ) +#define GetPlayerGang(%0) ( p_GangID[ %0 ] ) /* ** Variables ** */ enum e_gang_data diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index d1b7320..f73c1ce 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -28191,8 +28191,8 @@ thread OnHouseLoad( ) cache_get_field_content( i, "AMMO", weapon_info ), sscanf( weapon_info, "p<.>e", g_HouseWeaponAmmo[ handle ] ); } } - printf( "[HOUSES]: %d houses have been loaded. (Tick: %dms)", i, GetTickCount( ) - loadingTick ); } + printf( "[HOUSES]: %d houses have been loaded. (Tick: %dms)", rows, GetTickCount( ) - loadingTick ); // Make Lorenc the owner of unowned VIP houses foreach ( new houseid : houses ) if ( g_houseData[ houseid ] [ E_COST ] < 10000 ) { @@ -37891,38 +37891,16 @@ stock BreakPlayerCuffs( playerid ) return 1; } -stock GetServerTime( ) return g_iTime; - -stock GetPlayerAccountID( playerid ) return p_AccountID[ playerid ]; - -stock GetPlayerVIPLevel( playerid ) return p_VIPLevel[ playerid ]; - -stock GetPlayerVIPDuration( playerid ) return p_VIPExpiretime[ playerid ] - g_iTime; - -stock IsPlayerInPaintBall( playerid ) return p_inPaintBall{ playerid }; - -stock IsPlayerMovieMode( playerid ) return p_inMovieMode{ playerid }; - -stock GetPlayerAdminLevel( playerid ) return p_AdminLevel[ playerid ]; - -stock GetPlayerGang( playerid ) return p_GangID[ playerid ]; - -stock IsPlayerSpawned( playerid ) return p_Spawned{ playerid }; - -stock IsPlayerInEvent( playerid ) return ( GetPlayerVirtualWorld( playerid ) == 69 ); - -stock IsPlayerJailed( playerid ) return p_Jailed{ playerid }; - -stock IsPlayerAdminOnDuty( playerid ) return p_AdminOnDuty{ playerid }; - stock IsPlayerEmailVerified( playerid ) return p_accountSecurityData[ playerid ] [ E_ID ]; stock IsPlayerAFK( playerid ) return ( ( GetTickCount( ) - p_AFKTime[ playerid ] ) >= 2595 ); +stock GetPlayerVIPDuration( playerid ) return p_VIPExpiretime[ playerid ] - g_iTime; + +stock IsPlayerInEvent( playerid ) return ( GetPlayerVirtualWorld( playerid ) == 69 ); + stock UpdatePlayerEntranceExitTick( playerid, ms = 2000 ) { p_EntranceTickcount[ playerid ] = GetTickCount( ) + ms; } stock CanPlayerExitEntrance( playerid ) return GetTickCount( ) > p_EntranceTickcount[ playerid ] && ! p_pausedToLoad{ playerid }; - -stock IsPlayerSpawnProtected( playerid ) return p_AntiSpawnKillEnabled{ playerid };