AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Help] Zombie plague Vip Classes (https://forums.alliedmods.net/showthread.php?t=246430)

Alexblood2013 08-17-2014 11:21

[Help] Zombie plague Vip Classes
 
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.

Spoiler


Spoiler

zmd94 08-17-2014 12:01

Re: [Help] Zombie plague Vip Classes
 
Just follow this steps. It is very easy. ;)

Alexblood2013 08-17-2014 12:23

Re: [Help] Zombie plague Vip Classes
 
Quote:

Originally Posted by zmd94 (Post 2185244)
Just follow this steps. It is very easy. ;)

I've tried , but i don't get it..

Can you make a class to follow you're model?

Alexblood2013 08-17-2014 16:45

Re: [Help] Zombie plague Vip Classes
 
I've tried , but i don't get it...

zmd94 08-17-2014 16:52

Re: [Help] Zombie plague Vip Classes
 
The steps:

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(id0)
            
client_print(idprint_center"Your selected class in only for *VIP* members")
            
client_print(idprint_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(id0)
            
client_print(idprint_center"Your selected class in only for *VIP* members")
            
client_print(idprint_chat"Your selected class in only for *VIP* members. Changed to default zombie class.")
        }
    }



Alexblood2013 08-17-2014 17:37

Re: [Help] Zombie plague Vip Classes
 
Spoiler


<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

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(idclassid) {
    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(idclassid) {
    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(idprint_center"Your selected class in only for *VIP* members")
client_print(idprint_chat"Your selected class in only for *VIP* members. Changed to default zombie class."

--->
PHP Code:

public zp_fw_class_zombie_select_pre(idclassid) {
    if (
classid == g_ZombieClassID) {
        if (
zv_get_user_flags(id) == 0) {
            
zp_class_zombie_menu_text_add("*VIP* only!")
            
client_print(idprint_center"Your selected class in only for *VIP* members")
            
client_print(idprint_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..?

Spoiler


All times are GMT -4. The time now is 13:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.