Eu queria saber como por para o primeiro zombie ganhar uma bomba de infeccao gratis, vi isso em servidores gringos, se alguem souber peco por favor que me ensine
Código:
#include <amxmodx>
#include <cstrike>
#include < fun >
#include <zombieplague>
// Zombie Infect
new const zclass_name[] = { "Zombie Infect" } // Nome do Zombie
new const zclass_info[] = { "Bomba de Infeccao" } // Descriçao do zombie
new const zclass_model[] = { "zombie_source" } // Model do zombie
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // Model da mao do zombie
const zclass_health = 2100 // Vida do Zombie
const zclass_speed = 255 // Velocidade do Zombie
const Float:zclass_gravity = 1.0 // Gravidade do Zombie
const Float:zclass_knockback = 0.8 // Impacto do zombie
new g_zclass_infecter, Ammo
public plugin_init(){
Ammo = register_cvar("zp_infecter_amt", "1")
}
public plugin_precache()
{
register_plugin("Zombie Classe : Infect", "1.0", "MtsLa!<3.L")
g_zclass_infecter = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public zp_user_infected_post(id, infector)
{
if(is_user_connected(id) && zp_get_user_first_zombie(id))
{
if (zp_get_user_zombie_class(id) == g_zclass_infecter && !zp_get_user_nemesis(id))
{
client_print(id, print_chat, "[ZP] Voce Ganhou Uma Bomba de Infeccao")
give_item (id, "weapon_hegrenade")
set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderNormal,100)
cs_set_user_bpammo(id, CSW_HEGRENADE, get_pcvar_num(Ammo))
}
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
*/
Código:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <zombieplague>
#define PLUGIN "Frist Zombie Fury"
#define VERSION "1.0"
#define AUTHOR "Biel-oGrande"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
}
public zp_user_infected_post(id) {
if(is_user_connected(id) && zp_get_user_first_zombie(id)) {
zp_force_buy_extra_item(id, 3, 1)
}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1046{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
ZORO escreveu:Fechado.Obrigado MtsLa!<3.L ^^