drop health according to dm level
This commit is contained in:
parent
b245112594
commit
cbc7e6a429
@ -30,8 +30,6 @@ enum E_WEAPONDROP_DATA {
|
|||||||
static g_weaponDropData [ MAX_WEAPON_DROPS ] [ E_WEAPONDROP_DATA ];
|
static g_weaponDropData [ MAX_WEAPON_DROPS ] [ E_WEAPONDROP_DATA ];
|
||||||
static Iterator: weapondrop < MAX_WEAPON_DROPS >;
|
static Iterator: weapondrop < MAX_WEAPON_DROPS >;
|
||||||
|
|
||||||
static const g_rankHealthPayout[ ] = { 100, 75, 50, 45, 40, 35, 30, 25, 20, 15, 10 };
|
|
||||||
|
|
||||||
static g_HealthPickup;
|
static g_HealthPickup;
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
@ -57,10 +55,8 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
|||||||
|
|
||||||
GetPlayerPos( playerid, X, Y, Z );
|
GetPlayerPos( playerid, X, Y, Z );
|
||||||
|
|
||||||
|
|
||||||
new
|
new
|
||||||
killer_rank = GetPlayerRank( killerid ),
|
expire_time = GetServerTime( ) + 180;
|
||||||
expire_time = gettime( ) + 180;
|
|
||||||
|
|
||||||
for ( new slotid = 0; slotid < 13; slotid++ )
|
for ( new slotid = 0; slotid < 13; slotid++ )
|
||||||
{
|
{
|
||||||
@ -79,8 +75,17 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
new
|
||||||
|
killer_dm_level = floatround( GetPlayerLevel( killerid, E_DEATHMATCH ) );
|
||||||
|
|
||||||
|
if ( killer_dm_level > 100 ) {
|
||||||
|
killer_dm_level = 100;
|
||||||
|
}
|
||||||
|
|
||||||
// health drop
|
// health drop
|
||||||
CreateWeaponPickup( WEAPON_HEALTH, g_rankHealthPayout[ killer_rank ], 0, X + fRandomEx( 0.5, 3.0 ), Y + fRandomEx( 0.5, 3.0 ), Z, expire_time );
|
if ( killer_dm_level >= 10 ) {
|
||||||
|
CreateWeaponPickup( WEAPON_HEALTH, killer_dm_level, 0, X + fRandomEx( 0.5, 3.0 ), Y + fRandomEx( 0.5, 3.0 ), Z, expire_time );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
(+) "/perks" has been added and is based off your total level.
|
(+) "/perks" has been added and is based off your total level.
|
||||||
(+) Gang bank accounts are charged $250 per spawn in a facility.
|
(+) Gang bank accounts are charged $250 per spawn in a facility.
|
||||||
|
(/) Passive mode is automatically toggled for every player, use "/passive" to disable it.
|
||||||
|
(/) Business payouts have been significantly increased (how it was originally).
|
||||||
|
(/) You will drop health pickups matching your DM level (10+ DM level only for now).
|
||||||
(/) The XP bar has different colours for different levels.
|
(/) The XP bar has different colours for different levels.
|
||||||
(/) You need at least 7 days of VIP remaining before you can upgrade it.
|
(/) You need at least 7 days of VIP remaining before you can upgrade it.
|
||||||
(*) Fix business issue with production not beginning with maxed supplies.
|
(*) Fix business issue with production not beginning with maxed supplies.
|
Loading…
Reference in New Issue
Block a user