Quote:
Originally Posted by xPaw
Try this
PHP Code:
#include <amxmodx> #include <zombieplague> new g_pCvarAmmo[ 3 ]; public plugin_init( ) { register_plugin( "End Round Reward", "1.0", "asd" ); g_pCvarAmmo[ WIN_HUMANS ] = register_cvar( "humans_ammopack", "5" ); g_pCvarAmmo[ WIN_ZOMBIES ] = register_cvar( "zombies_ammopack", "5" ); } public zp_round_ended( iTeam ) { if( iTeam == WIN_NO_ONE ) return; new id, iPlayers[ 32 ], iNum, iPacks = get_pcvar_num( g_pCvarAmmo[ iTeam ] ); get_players( iPlayers, iNum, "ac" ); for( new i; i < iNum; i++ ) { zp_set_user_ammo_packs( ( id = iPlayers[ i ] ), zp_get_user_ammo_packs( id ) + iPacks ); } }
|
Sorrry for the double posting.
Xpaw yours didnt' work correctly
I want it like this :
Example:
If the user have 3 ammo pack, his team wins. the cvar is 5 ammo pack reward.
Hes ammo pack should be 8.
Yours:
If the user have 3 ammo pack, his team wins. the cvar is 5 ammo pack reward.
Hes ammo pack is 5.