Stiahol som si nejaké Zombie Modely pre svoj Server, no a keď sa snažím dať hráčovi konkrétny model, tak mi nefunguje. Skúšal som na miesto Zombie dať aj klasický model, ktorý som stiahol napr. z GameBanana.
Script:
Kód: Vybrat vše
#include <amxmisc>
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
//Definície
#define VIP ADMIN_LEVEL_A
public plugin_init()
{
register_plugin("VIP Menu", "1.0", "RayCodeCSC")
register_clcmd("say /vipmenu", "vip_menu")
register_clcmd("say /vm", "vip_menu")
register_clcmd("say /vip", "vip_buy")
}
public plugin_precache()
{
precache_model("models/zombie_models_vip/Alien_Boss/Alien_Boss.mdl")
precache_model("models/zombie_models_vip/big_zm/big_zm.mdl")
precache_model("models/zombie_models_vip/crunch/crunch.mdl")
precache_model("models/zombie_models_vip/z_headcrab/z_headcrab.mdl")
precache_model("models/zombie_models_vip/z_heal/z_heal.mdl")
precache_model("models/zombie_models_vip/z_heavy/z_heavy.mdl")
precache_model("models/zombie_models_vip/z_regular/z_regular.mdl")
precache_model("models/zombie_models_vip/zombie_hero/zombie_hero.mdl")
}
public vip_menu(id)
{
if(is_user_alive(id))
{
if(get_user_flags(id) && VIP)
{
new vipmenu = menu_create("VIP Menu v1.0", "vip_menu_selection")
menu_additem(vipmenu, "Vyber skin hraca")
menu_additem(vipmenu, "Kupit zbran")
menu_display(id, vipmenu)
}
else
{
client_print(id, print_chat, "[VIP-MENU] Nie si VIP!")
}
}
else
{
client_print(id, print_chat, "[VIP-MENU] Musis byt zivy!")
}
}
public vip_menu_selection(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
switch(item)
{
case 0:
{
vybrat_skin(id)
}
case 1:
{
kupit_zbran(id)
}
}
}
vybrat_skin(id)
{
new vyber_skin = menu_create("Vyber si skin:", "zombie_skins_selection")
menu_additem(vyber_skin, "Alien Boss")
menu_additem(vyber_skin, "Zombie Hero")
menu_additem(vyber_skin, "HeadCrab")
menu_additem(vyber_skin, "Crunch")
menu_additem(vyber_skin, "Heal Zombie")
menu_additem(vyber_skin, "Regular Zombie")
menu_additem(vyber_skin, "Heavy Zombie")
menu_additem(vyber_skin, "Big Zombie")
menu_display(id, vyber_skin)
}
public zombie_skins_selection(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
switch(item)
{
case 0:
{
cs_set_user_model(id, "Alien_Boss")
}
case 1:
{
cs_set_user_model(id, "zombie_hero")
}
case 2:
{
cs_set_user_model(id, "z_headcrab")
}
case 3:
{
cs_set_user_model(id, "crunch")
}
case 4:
{
cs_set_user_model(id, "z_heal")
}
case 5:
{
cs_set_user_model(id, "z_regular")
}
case 6:
{
cs_set_user_model(id, "z_heavy")
}
case 7:
{
cs_set_user_model(id, "big_zm")
}
}
}
kupit_zbran(id)
{
new buy_weap = menu_create("Kupit zbrane pre VIP:", "buy_weaps_selection")
menu_additem(buy_weap, "AK-47 (\y12000$\w)") //AK47, 12 000$
menu_additem(buy_weap, "M4A1 (\y12000$\w)") //M4A1, 12 000$
menu_additem(buy_weap, "DEAGLE (\y12000$\w)") //DEAGLE, 12 000$
menu_display(id, buy_weap)
}
public buy_weaps_selection(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}
switch(item)
{
case 0:
{
if(cs_get_user_money(id) >= 12000)
{
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 250)
}
else if(cs_get_user_money(id) < 12000)
{
client_print(id, print_chat, "[VIP-MENU] Nemas dostatok penazi!")
}
}
case 1:
{
if(cs_get_user_money(id) >= 12000)
{
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 250)
}
else if(cs_get_user_money(id) < 12000)
{
client_print(id, print_chat, "[VIP-MENU] Nemas dostatok penazi!")
}
}
case 2:
{
if(cs_get_user_money(id) >= 12000)
{
give_item(id, "weapon_deagle")
cs_set_user_bpammo(id, CSW_DEAGLE, 250)
}
else if(cs_get_user_money(id) < 12000)
{
client_print(id, print_chat, "[VIP-MENU] Nemas dostatok penazi!")
}
}
}
}
public vip_buy(id)
{
client_print(id, print_chat, "[HIGHMASTER.EU] VIP si mozes zakupit na nasom webe highmaster.eu/servery")
}