Nie wiesz jak ?
No to zaczynamy
Otwieramy .SMA jakiejś klasy
Krok 1
Dodajemy:
#include <zombieplague>
Krok 2
Po kodzie:
new const zclass_name[] = { "Zombie amxx" }
new const zclass_info[] = { "Premium" }
new const zclass_model[] = { "premium" }
new const zclass_clawmodel[] = { "premium.mdl" }
const zclass_health = 2100
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0
Dajemy:
new zombie
Krok 3
Zamieniamy:
zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
na:
zombie = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
Krok 4
Na końcu kodu dodajemy:
public zp_user_infected_pre(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
if (zp_get_user_next_class(id) == zombie)
{
zp_set_user_zombie_class(id, 0)
client_print(id, print_center, "Ta klasa jest premium")
}
}
}
Całość powinna wyglądać tak:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>
new const zclass_name[] = { "Zombie amxx" }
new const zclass_info[] = { "Premium" }
new const zclass_model[] = { "premium" }
new const zclass_clawmodel[] = { "premium.mdl" }
const zclass_health = 2100
const zclass_speed = 190
const Float:zclass_gravity = 1.0
const Float:zclass_knockback = 1.0
new zombie
public plugin_precache()
{
register_plugin("klasa premum", "1.0", "Mountan.")
zombie = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
public zp_user_infected_pre(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_H))
{
if (zp_get_user_next_class(id) == zombie)
{
zp_set_user_zombie_class(id, 0)
client_print(id, print_center, "Ta klasa jest premium")
}
}
}


Dodatki SourceMod














