Server Sided Health/Armour Functions.
#10

ALS hook SetPlayerHealth/Armour, GetPlayerHealth/Armour, and under OnPlayerTakeDamage do the thing.
Example:
PHP Code:
SetPlayerArmourExplayeridFloat:armour ) {
    
PlayerInfoplayerid ] [ pArmor ] = armour;
    return 
SetPlayerArmourplayeridPlayerInfoplayerid ] [ pArmor ] );
}
GetPlayerArmourExplayerid, &Float:armour ) {
    return 
PlayerInfoplayerid ] [ pArmor ];
}
#if defined _ALS_SetPlayerHealth
    #undef SetPlayerArmour 
#else 
    #define _ALS_SetPlayerArmour
#endif
#define SetPlayerArmour SetPlayerArmourEx
#if defined _ALS_GetPlayerArmour
    #undef GetPlayerArmour 
#else 
    #define _ALS_GetPlayerArmour
#endif
#define GetPlayerArmour GetPlayerArmourEx 
Reply


Messages In This Thread
Server Sided Health/Armour Functions. - by SkyFlare - 01.07.2020, 09:57
Re: Server Sided Health/Armour Functions. - by SharpenBlade - 01.07.2020, 10:05
Re: Server Sided Health/Armour Functions. - by SkyFlare - 01.07.2020, 10:14
Re: Server Sided Health/Armour Functions. - by SharpenBlade - 01.07.2020, 10:24
Re: Server Sided Health/Armour Functions. - by SkyFlare - 01.07.2020, 10:26
Re: Server Sided Health/Armour Functions. - by SharpenBlade - 01.07.2020, 11:32
Re: Server Sided Health/Armour Functions. - by SkyFlare - 01.07.2020, 11:37
Re: Server Sided Health/Armour Functions. - by SharpenBlade - 01.07.2020, 12:40
Re: Server Sided Health/Armour Functions. - by SkyFlare - 01.07.2020, 14:14
Re: Server Sided Health/Armour Functions. - by ShadowMortar - 01.07.2020, 14:23

Forum Jump:


Users browsing this thread: 1 Guest(s)