Zh cn:Compiling Plugins (AMX Mod X)

From AlliedModders Wiki
Jump to: navigation, search
  1. include <amxmodx>
  2. include <fakemeta_util>
  3. include <fun>
  1. tryinclude <biohazard>
  1. if !defined _biohazard_included
       #assert Biohazard functions file required!
  1. endif


new zomb_ambience


public plugin_init() {

    register_plugin("Bio Ambience", "0.1", "Virtual Vybz for PhoEnix-eSports")

zomb_ambience = register_cvar("bh_ambience","1")

    set_task(1.0, "ambience_loop")

}

public plugin_precache() { precache_sound("PhoEnix-eSports/ambience.wav") }

public ambience_loop() { if(!get_pcvar_num(zomb_ambience)) return PLUGIN_HANDLED

client_cmd(0,"spk PhoEnix-eSports/ambience.wav")

set_task(17.0,"ambience_loop")

return PLUGIN_CONTINUE }