Second Problem.
PHP Code:
#include <amxmodx>
#include <zombieplague>
new g_pCvarAmmo[ 2 ]
new g_iMaxPlayers
public plugin_init( )
{
register_plugin( "End Round Reward", "1.0", "asd" )
g_pCvarAmmo[ 0 ] = register_cvar( "humans_ammopack", "5" )
g_pCvarAmmo[ 1 ] = register_cvar( "zombies_ammopack", "5" )
g_iMaxPlayers = get_maxplayers( )
}
public zp_round_ended( team )
{
for ( new i = 1; i <= g_iMaxPlayers; i++ )
{
if ( !is_user_alive( i ) )
continue
switch ( team )
{
case WIN_HUMANS: zp_set_user_ammo_packs( i, zp_get_user_ammo_packs( i ) +get_pcvar_num( g_pCvarAmmo[ 0 ] ) )
case WIN_ZOMBIES: zp_set_user_ammo_packs( i, zp_get_user_ammo_packs( i ) +get_pcvar_num( g_pCvarAmmo[ 1 ] ) )
}
}
}
Sometime it doesn't work.
I want it like if human win at the end round it give them ammo pack