Thread: [Suggestion / Subplugin Request] [Req] Need ZP Plugin
View Single Post
yOou Know Me
BANNED
Join Date: Oct 2009
Old 12-23-2011 , 14:30   Re: [Req] Need ZP Plugin
Reply With Quote #19

So it should be like this, thanks, but i have another problem. I have "save ammo" and when i connect i get 5 ammo automatically, and when i retry i can make 50 ammo in less than few seconds.. Can you make it to give ammo, only when you were in the previus round and you have staid for the new round. I hope you undarstand me ? Like to skip the first round when you connect, you stay true the round and when it comes the next round than to give 5 ammo. That is why i needet it to be only on new round, but i didn't explain it well the first time.
Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "AmmoPack on this flags"
#define VERSION "0.1"
#define AUTHOR "MuhdZaim"

#define FLAGS ADMIN_LEVEL_A

new cvar_ammo

public plugin_init() 
{
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    RegisterHam(Ham_Spawn, "player", "Fw_Spawn", 1)
    
    cvar_ammo = register_cvar("zp_extra_ap", "5")
}

public Fw_Spawn(id) 
{
    if ( is_user_alive(id) ) 
    {
        if ( get_user_flags(id) & FLAGS ) 
        {
            zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + get_pcvar_num ( cvar_ammo ) )
        }
    }
}
yOou Know Me is offline