Raised This Month: $ Target: $400
 0% 

[Help] Zombie plague Vip Classes


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 11:21   [Help] Zombie plague Vip Classes
Reply With Quote #1

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

Last edited by Alexblood2013; 08-17-2014 at 11:32.
Alexblood2013 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-17-2014 , 12:01   Re: [Help] Zombie plague Vip Classes
Reply With Quote #2

Just follow this steps. It is very easy. ;)
zmd94 is offline
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 12:23   Re: [Help] Zombie plague Vip Classes
Reply With Quote #3

Quote:
Originally Posted by zmd94 View Post
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 is offline
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 16:45   Re: [Help] Zombie plague Vip Classes
Reply With Quote #4

I've tried , but i don't get it...
Alexblood2013 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-17-2014 , 16:52   Re: [Help] Zombie plague Vip Classes
Reply With Quote #5

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.")
        }
    }

zmd94 is offline
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 17:37   Re: [Help] Zombie plague Vip Classes
Reply With Quote #6

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

Last edited by Alexblood2013; 08-17-2014 at 17:59.
Alexblood2013 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-17-2014 , 18:58   Re: [Help] Zombie plague Vip Classes
Reply With Quote #7

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;


Last edited by zmd94; 08-17-2014 at 18:58.
zmd94 is offline
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 19:29   Re: [Help] Zombie plague Vip Classes
Reply With Quote #8

And how i can add a message like " You don't have acces when player isn't vip?
Alexblood2013 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 08-17-2014 , 19:38   Re: [Help] Zombie plague Vip Classes
Reply With Quote #9

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.")
zmd94 is offline
Alexblood2013
Senior Member
Join Date: Aug 2014
Old 08-17-2014 , 19:46   Re: [Help] Zombie plague Vip Classes
Reply With Quote #10

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
Alexblood2013 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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