Hello, I've tried a lot to make a zombie vipclass but i can't do it...
I've use addons 5.0.8 zp.
I've use Zombie vip by arnaaas 1.7.2.
Can someone make this 2 class for vip for me to see what is the diference? and how i need to put codes..
Or if someone can to do one with adminonly and other with vip I will thank so much.
public plugin_precache()
{
g_zclass_smoker = zp_class_zombie_register(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
new index
zp_class_zombie_register_kb(g_zclass_smoker, zclass_knockback)
for (index = 0; index < sizeof zclass_model; index++)
zp_class_zombie_register_model(g_zclass_smoke r, zclass_model[index])
for (index = 0; index < sizeof zclass_clawmodel; index++)
zp_class_zombie_register_claw(g_zclass_smoker , zclass_clawmodel[index])
if (!(oldbutton & IN_RELOAD) && (button & IN_RELOAD))
drag_start(id)
if ((oldbutton & IN_RELOAD) && !(button & IN_RELOAD))
drag_end(id)
}
public fwd_Ham_Spawn_post(id)
{
if (IsUserAlive(id))
{
if (g_hooked[id])
drag_end(id)
}
return HAM_IGNORED;
}
public drag_start(id)
{
if (~IsUserAllow(id))
return
static Float:cdown
cdown = 50.0
if (get_gametime() - g_lastHook[id] < cdown)
{
ColorChat(id, GREEN, "^1[^4ZP^1] You must wait ^4%.f0^1s", cdown - (get_gametime() - g_lastHook[id]))
return
}
else
{
g_lastHook[id] = get_gametime()
new hooktarget, body
get_user_aiming(id, hooktarget, body)
if (IsUserAlive(hooktarget))
{
if (!zp_core_is_zombie(hooktarget))
{
if (zp_class_survivor_get(hooktarget))
{
ColorChat(id, GREEN, "^1[^4ZP^1] You can't use this on a Survivor!")
return
}
g_ZombieClassID = zp_class_zombie_register(zombieclass1_name, zombieclass1_info, zombieclass1_health, zombieclass1_speed, zombieclass1_gravity)
zp_class_zombie_register_kb(g_ZombieClassID, zombieclass1_knockback)
for (index = 0; index < sizeof zombieclass1_models; index++)
zp_class_zombie_register_model(g_ZombieClassI D, zombieclass1_models[index])
for (index = 0; index < sizeof zombieclass1_clawmodels; index++)
zp_class_zombie_register_claw(g_ZombieClassID , zombieclass1_clawmodels[index])
set_task(1.0, "advertise")
}
public advertise()
{
for (new i = 1; i <get_maxplayers(); i++)
{
if(is_user_alive(i) && zp_core_is_zombie(i) && zp_class_zombie_get_current(i) == g_ZombieClassID)
{
zp_colored_print(i, "Press G to use your skill^x03 Half blood houl !!")
set_task(30.0, "newadd", i)
}
}
}
public newadd(i)
{
if(is_user_alive(i) && zp_core_is_zombie(i) && zp_class_zombie_get_current(i) == g_ZombieClassID)
{
zp_colored_print(i, "Press G to use your skill^x03 Half blood houl !!")
set_task(30.0, "newadd", i)
}
1. Just add #include <zmvip> in both code below #include <***> (any include).
2. For the first code, just add this part after the public plugin_init section:
PHP Code:
public zp_user_infected_pre(id) { if(zv_get_user_flags(id) == 0) { if(zp_get_user_next_class(id) == g_zclass_smoker) { zp_set_user_zombie_class(id, 0) client_print(id, print_center, "Your selected class in only for *VIP* members") client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.") } } }
3. For the second code, just add this part after the public plugin_init section:
PHP Code:
public zp_user_infected_pre(id) { if(zv_get_user_flags(id) == 0) { if(zp_get_user_next_class(id) == g_ZombieClassID) { zp_set_user_zombie_class(id, 0) client_print(id, print_center, "Your selected class in only for *VIP* members") client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.") } } }
stunTime = register_cvar("zp_smoker_stun", "2.0")
breakDamage = register_cvar("zp_smoker_break", "100")
}
public zp_user_infected_pre(id) {
if(zv_get_user_flags(id) == 0) {
if(zp_get_user_next_class(id) == g_zclass_smoker) {
zp_set_user_zombie_class(id, 0)
client_print(id, print_center, "Your selected class in only for *VIP* members")
client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.")
}
}
}
public plugin_precache()
{
g_zclass_smoker = zp_class_zombie_register(zclass_name, zclass_info, zclass_health, zclass_speed, zclass_gravity)
new index
zp_class_zombie_register_kb(g_zclass_smoker, zclass_knockback)
for (index = 0; index < sizeof zclass_model; index++)
zp_class_zombie_register_model(g_zclass_smoke r, zclass_model[index])
for (index = 0; index < sizeof zclass_clawmodel; index++)
zp_class_zombie_register_claw(g_zclass_smoker , zclass_clawmodel[index])
if (!(oldbutton & IN_RELOAD) && (button & IN_RELOAD))
drag_start(id)
if ((oldbutton & IN_RELOAD) && !(button & IN_RELOAD))
drag_end(id)
}
public fwd_Ham_Spawn_post(id)
{
if (IsUserAlive(id))
{
if (g_hooked[id])
drag_end(id)
}
return HAM_IGNORED;
}
public drag_start(id)
{
if (~IsUserAllow(id))
return
static Float:cdown
cdown = 50.0
if (get_gametime() - g_lastHook[id] < cdown)
{
ColorChat(id, GREEN, "^1[^4ZP^1] You must wait ^4%.f0^1s", cdown - (get_gametime() - g_lastHook[id]))
return
}
else
{
g_lastHook[id] = get_gametime()
new hooktarget, body
get_user_aiming(id, hooktarget, body)
if (IsUserAlive(hooktarget))
{
if (!zp_core_is_zombie(hooktarget))
{
if (zp_class_survivor_get(hooktarget))
{
ColorChat(id, GREEN, "^1[^4ZP^1] You can't use this on a Survivor!")
return
}
<60>: error 017: undefined symbol "zp_get_user_next"class"
<61>: error 017: undefined symbol "zp_set_user_zombie_class"
Compile failed.
@ I've changed the code from other, compiled succeful , but class isn't in zombie classes
Spoiler
public zp_fw_class_zombie_select_pre(id, classid) {
if (classid == g_zclass_smoker) {
if (zv_get_user_flags(id) == 0) {
zp_class_zombie_menu_text_add("*VIP* only!")
return ZP_CLASS_NOT_AVAILABLE;
}
else {
zp_class_zombie_menu_text_add("*VIP*")
return ZP_CLASS_AVAILABLE;
}
}
return ZP_CLASS_AVAILABLE;
zmd94
08-17-2014 18:58
Re: [Help] Zombie plague Vip Classes
Sorry, my mistake. I don't realise that this code is using ZP5.0 coding style.
Just follow this new steps:
1. Please restore the code to the original code.
2. Just add #include <zmvip> in both code below #include <***> (any include).
3. For the first code, just add this part after the public zp_fw_core_infect_post(id) section:
PHP Code:
public zp_fw_class_zombie_select_pre(id, classid) { if (classid == g_zclass_smoker) { if (zv_get_user_flags(id) == 0) { zp_class_zombie_menu_text_add("*VIP* only!") return ZP_CLASS_NOT_AVAILABLE; } else { zp_class_zombie_menu_text_add("*VIP*") return ZP_CLASS_AVAILABLE; } } return ZP_CLASS_AVAILABLE; }
4. For the second code, just add this part after the public zp_fw_core_infect_post(id) section:
PHP Code:
public zp_fw_class_zombie_select_pre(id, classid) { if (classid == g_ZombieClassID) { if (zv_get_user_flags(id) == 0) { zp_class_zombie_menu_text_add("*VIP* only!") return ZP_CLASS_NOT_AVAILABLE; } else { zp_class_zombie_menu_text_add("*VIP*") return ZP_CLASS_AVAILABLE; } } return ZP_CLASS_AVAILABLE; }
Alexblood2013
08-17-2014 19:29
Re: [Help] Zombie plague Vip Classes
And how i can add a message like " You don't have acces when player isn't vip?
zmd94
08-17-2014 19:38
Re: [Help] Zombie plague Vip Classes
Just add this:
PHP Code:
client_print(id, print_center, "Your selected class in only for *VIP* members") client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.")
--->
PHP Code:
public zp_fw_class_zombie_select_pre(id, classid) { if (classid == g_ZombieClassID) { if (zv_get_user_flags(id) == 0) { zp_class_zombie_menu_text_add("*VIP* only!") client_print(id, print_center, "Your selected class in only for *VIP* members") client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.") return ZP_CLASS_NOT_AVAILABLE; } else { zp_class_zombie_menu_text_add("*VIP*") return ZP_CLASS_AVAILABLE; } } return ZP_CLASS_AVAILABLE; }
So, just change the text in this part:
Quote:
client_print(id, print_center, "Your selected class in only for *VIP* members")
client_print(id, print_chat, "Your selected class in only for *VIP* members. Changed to default zombie class.")
Alexblood2013
08-17-2014 19:46
Re: [Help] Zombie plague Vip Classes
Oh ... class still don't appear on Zombie CLasses ^_^'
I tried rz_vip.
And here there work , but is a diference..
Cand you add the same mesage on this script please..?