Raised This Month: $12 Target: $400
 3% 

[Request] "Rank" for ZP 5.8


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 07-21-2013 , 06:32   [Request] "Rank" for ZP 5.8
Reply With Quote #1

Hey I been wondering if someone could help me out and make a plugin that creates a rank such as Zombies on Drugs servers for example:

HP: 100 - Ammo Packs: 100 - Soldier

when you reach a certain number of ammo packs your "rank" will become another.
it would be cool if someone could make it and let people change names and amount of ap needed with cvar or something like that.

Thank You
Copper is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 07-21-2013 , 17:26   Re: [Request] "Rank" for ZP 5.8
Reply With Quote #2

ya, can someone try to do..thx
wicho is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 07-22-2013 , 01:54   Re: [Request] "Rank" for ZP 5.8
Reply With Quote #3

I'm working on one, it will work if u dont change anything (including the cvar)(And it will work for a max of 1500 AP, so be careful) , so if u wanna edit it just PM me , also i need you to tell me where do u want the rank to appear ? I dont wanna put it in the zp50_ main plugin so tell me where do u want to set that HUD message ?
__________________
You will find everything u need :-
Catastrophe is offline
Catastrophe
Veteran Member
Join Date: Jul 2012
Location: somewhere between narnia
Old 07-22-2013 , 02:33   Re: [Request] "Rank" for ZP 5.8
Reply With Quote #4

Ok so i made this, but i dont know it does not seem to work, the rank wont change -_-, it seems perfect, can any1 have a look at it ? Please...

PHP Code:
#include <amxmodx>
#include <zp50_core>
#include <zp50_ammopacks>

new cvar_ap

new lvl[33]

public 
plugin_init()
{
       
register_plugin("Addon: AP ranks""1.0""Catastrophe")
       
cvar_ap register_cvar("zp_ranks_ap_required""100")
}

new const 
RANKS[][]=
{
    
"Beginner",    
    
"Civilian",           
    
"Private",
    
"Loner",
    
"Learner",
    
"Master",
    
"Coloner",
    
"Sergeant",
    
"Captain",
    
"Leutinent"
    
"Director General",
    
"Living Legend",
    
"Unbeatable",
    
"Demigod",
    
"Invincible"


public 
client_connect(id)  

    
set_task(3.0"Showinfo"id+672)
    
set_task(2.0"check"id+674)
}

public 
client_disconnect(id)
{
    
remove_task(id+672)
    
remove_task(id+674)

}

public 
check(id)
{
       
id -= 674

       if(!
is_user_connected(id) || !is_user_alive(id))
       return    

       if(
zp_ammopacks_get(id) == 0)
       {

       
lvl[id] = 0

       
}

       else if(
zp_ammopacks_get(id) != && zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap))
       {

       
lvl[id] = 1

       
}
        
       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap) && 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*2)
       {

       
lvl[id] = 2

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*3)
          
       { 

       
lvl[id] = 3

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*4)
       {

       
lvl[id] = 4

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*5)
       {

       
lvl[id] = 5

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*6)
       {

       
lvl[id] = 6

       


       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*7)
       {

       
lvl[id] = 7

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*8)
       {

       
lvl[id] = 8

       
}
    
       else if(
zp_ammopacks_get(id) >  get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*9)
       {

       
lvl[id] = 9

       
}

       else if(
zp_ammopacks_get(id) >  get_pcvar_num(cvar_ap)*&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*10)
       {

       
lvl[id] = 10

       
}

       else if(
zp_ammopacks_get(id) >  get_pcvar_num(cvar_ap)*10&& 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*11)
       {

       
lvl[id] = 11

       
}
   
       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*11 && 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*12)
       {

       
lvl[id] = 12

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*12 && 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*13)
       {

       
lvl[id] = 13

       
}

       else if(
zp_ammopacks_get(id) >  get_pcvar_num(cvar_ap)*13 && 
          
zp_ammopacks_get(id) <= get_pcvar_num(cvar_ap)*14)
       {

       
lvl[id] = 14

       
}

       else if(
zp_ammopacks_get(id) > get_pcvar_num(cvar_ap)*14)
       {

       
lvl[id] = 15

       
}

       
set_task(2.0"check"id+674)

}

public 
Showinfo(id)  
{  
     
id -= 672;  
 
     
set_task(0.1"Showinfo"id+672);      

     if (!
zp_core_is_zombie(id))
     {
   
      
set_hudmessage(02550, -1.00.00100.00.30.00.0);  
      
show_hudmessage(id"[Rank: %s]"RANKS[lvl[id]]);  

     }    

        

__________________
You will find everything u need :-
Catastrophe is offline
Copper
Senior Member
Join Date: Feb 2012
Location: California
Old 07-25-2013 , 04:00   Re: [Request] "Rank" for ZP 5.8
Reply With Quote #5

Can anyone try to fix it so it works on the main menu?
Copper is offline
walle7863
Junior Member
Join Date: Apr 2016
Old 04-25-2016 , 11:34   Re: [Request] "Rank" for ZP 5.8
Reply With Quote #6

Please get me this plugin my request please
walle7863 is offline
Reply


Thread Tools
Display Modes

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 20:46.


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