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

Zombie with admin flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-27-2016 , 06:34   Zombie with admin flag
Reply With Quote #1

Hello guys i am a new user and i want to give my 2 zombies admin flag access only.
I want this zombie to be with admin t flag or u can add new flag
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN "[ZP] Class : Pain Shock Free Zombie"
#define VERSION "1.2.3"
#define AUTHOR "Fry!"

const OFFSET_LINUX 5
const OFFSET_PAINSHOCK 108 // ConnorMcLeod

new const zclass_name[] = "Putin"
new const zclass_info[] = "\wHealth + \rPain Shock Free"
new const zclass_model[] = "zombie_source"
new const zclass_clawmodel[] = "v_knife_zombie.mdl"
const zclass_health 10000
const zclass_speed 190
const Float:zclass_gravity 0.350
const Float:zclass_knockback 0.0

new g_zclass_pain_shock_free
new bool:g_has_pain_shock_free[33]

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("zp_zclass_pain_shock_free",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
    
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage_Post"1)
}

public 
plugin_precache()
{
    
g_zclass_pain_shock_free zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
zp_user_infected_post(playerinfector)
{
    if (
zp_get_user_zombie_class(player) == g_zclass_pain_shock_free)
    {
        
g_has_pain_shock_free[player] = true
    
}
}

public 
fw_TakeDamage_Post(id)
{
    if (!
is_user_alive(id) || !zp_get_user_zombie(id))
        return 
HAM_IGNORED
        
    
if (zp_get_user_zombie_class(id) != g_zclass_pain_shock_free)
        return 
HAM_IGNORED
        
    g_has_pain_shock_free
[id] = true
        
    set_pdata_float
(idOFFSET_PAINSHOCK1.0OFFSET_LINUX)
    
    return 
HAM_IGNORED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
*/ 
here is my other zombie (i want h flag or u can add new)
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <zombieplague>

new const zclass_name[] = "Spendor"
new const zclass_info[] = "Free madness"
new const zclass_model[] = "zombie_source"
new const zclass_clawmodel[] = "v_knife_zombie.mdl"
const zclass_health 10000
const zclass_speed 275
const Float:zclass_gravity 0.8
const Float:zclass_knockback 0.5

new g_zclass_madness;
new 
Float:last_use[33];

public 
plugin_init()
{
    
register_plugin("[ZP] Zombie Class: Madness Zombie""0.1""WPMG Team")
    
register_clcmd("drop""use_skill")
}

public 
plugin_precache()
{
    
g_zclass_madness zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
zp_user_infected_post(idinfector)
{
    if(
zp_get_user_zombie_class(id) == g_zclass_madness)
    {
        
client_printcolor(id"^4[ZP] ^1Press ^4^"G^" ^1for use your madness.")
        
last_use[id] = 0.0
    
}
}

public 
use_skill(id)
{
    if(
is_user_alive(id) && !zp_get_user_nemesis(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_madness))
    {
        if((
last_use[id] + 15.0 <= get_gametime()))
        {
            
last_use[id] = get_gametime();

            
zp_force_buy_extra_item(id21)

            return 
PLUGIN_HANDLED;
        }
    }
    return 
PLUGIN_CONTINUE;
}

stock client_printcolor(const id, const input[], any:...)
{
    new 
iCount 1iPlayers[32]
    static 
szMsg[191]

    
vformat(szMsgcharsmax(szMsg), input3)
    
replace_all(szMsg190"/g""^4")
    
replace_all(szMsg190"/y""^1")
    
replace_all(szMsg190"/t""^3")
    
replace_all(szMsg190"/w""^0")

    if(
idiPlayers[0] = id
    
else get_players(iPlayersiCount"ch")

    for(new 
0iCounti++)
    {
        if(
is_user_connected(iPlayers[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _iPlayers[i])
            
write_byte(iPlayers[i])
            
write_string(szMsg)
            
message_end()
        }
    }

In second zombie please make its gravity 392.
Prabhnoor is offline
Kakarot47
Senior Member
Join Date: May 2015
Location: Pakistan
Old 06-27-2016 , 06:57   Re: Zombie with admin flag
Reply With Quote #2

Which admin access ? (FLAG ?)
__________________



AssasinSniperNightmare ModArmageddon ModApolacyps Mod
Kakarot47 is offline
Send a message via Skype™ to Kakarot47
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-27-2016 , 07:11   Re: Zombie with admin flag
Reply With Quote #3

I wanna say that admin flag means access flags that admin admin has like abcdegh etc. I wanna keep zombies for access flags
Prabhnoor is offline
Kakarot47
Senior Member
Join Date: May 2015
Location: Pakistan
Old 06-27-2016 , 07:31   Re: Zombie with admin flag
Reply With Quote #4

i understand but which flag ?

Only 1 flag will register

Choose any 1 flag
__________________



AssasinSniperNightmare ModArmageddon ModApolacyps Mod

Last edited by Kakarot47; 06-27-2016 at 07:31.
Kakarot47 is offline
Send a message via Skype™ to Kakarot47
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-27-2016 , 07:34   Re: Zombie with admin flag
Reply With Quote #5

Bro i want first zombie to be with t flag and second with s flag
(I want both zombies to have separate access)

Last edited by Prabhnoor; 06-27-2016 at 12:40.
Prabhnoor is offline
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-28-2016 , 05:43   Re: Zombie with admin flag
Reply With Quote #6

Can you make it? (Pls)
Prabhnoor is offline
ZdubZ0r
Senior Member
Join Date: Feb 2011
Location: Romania
Old 06-28-2016 , 07:10   Re: Zombie with admin flag
Reply With Quote #7

Here you go :
Code:
#include <amxmodx> 
#include <fakemeta> 
#include <hamsandwich> 
#include <zombieplague> 

#define PLUGIN "[ZP] Class : Pain Shock Free Zombie" 
#define VERSION "1.2.3" 
#define AUTHOR "Fry!" 

#define ADMIN ADMIN_LEVEL_H
const OFFSET_LINUX = 5 
const OFFSET_PAINSHOCK = 108 // ConnorMcLeod 

new const zclass_name[] = "Putin" 
new const zclass_info[] = "\wHealth + \rPain Shock Free" 
new const zclass_model[] = "zombie_source" 
new const zclass_clawmodel[] = "v_knife_zombie.mdl" 
const zclass_health = 10000 
const zclass_speed = 190 
const Float:zclass_gravity = 0.350 
const Float:zclass_knockback = 0.0 

new g_zclass_pain_shock_free 
new bool:g_has_pain_shock_free[33] 

public plugin_init() 
{ 
    register_plugin(PLUGIN, VERSION, AUTHOR) 
     
    register_cvar("zp_zclass_pain_shock_free",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY) 
     
    RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage_Post", 1) 
} 

public plugin_precache() 
{ 
    g_zclass_pain_shock_free = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback) 
} 

public zp_user_infected_pre(id)
{
    if(zp_get_user_next_class(id) != g_zclass_pain_shock_free) return; //not our current class id
    if(get_user_flags(id) & ADMIN) return; //flag match, we are (admin, vip).
    zp_set_user_zombie_class(id, 0) //we set to default zombie class. in this case we need a public zombie class that everyone can use it.
    client_print(id, print_chat, "Oppss! this zombie class is for ADMINS only.") //print some info.
}

public zp_user_infected_post(player, infector) 
{ 
    if (zp_get_user_zombie_class(player) == g_zclass_pain_shock_free) 
    { 
        g_has_pain_shock_free[player] = true 
    } 
} 

public fw_TakeDamage_Post(id) 
{ 
    if (!is_user_alive(id) || !zp_get_user_zombie(id)) 
        return HAM_IGNORED 
         
    if (zp_get_user_zombie_class(id) != g_zclass_pain_shock_free) 
        return HAM_IGNORED 
         
    g_has_pain_shock_free[id] = true 
         
    set_pdata_float(id, OFFSET_PAINSHOCK, 1.0, OFFSET_LINUX) 
     
    return HAM_IGNORED 
} 
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } 
*/

Last edited by ZdubZ0r; 06-28-2016 at 07:11.
ZdubZ0r is offline
Send a message via Yahoo to ZdubZ0r Send a message via Skype™ to ZdubZ0r
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-28-2016 , 08:57   Re: Zombie with admin flag
Reply With Quote #8

Thx for one zombie but you can make other zombie also?
Prabhnoor is offline
Prabhnoor
Junior Member
Join Date: Jun 2016
Old 06-28-2016 , 09:12   Re: Zombie with admin flag
Reply With Quote #9

This zombie with t flag
PHP Code:
#include <amxmodx> 
#include <fakemeta> 
#include <zombieplague> 

new const zclass_name[] = "Spendor" 
new const zclass_info[] = "Free madness" 
new const zclass_model[] = "zombie_source" 
new const zclass_clawmodel[] = "v_knife_zombie.mdl" 
const zclass_health 10000 
const zclass_speed 275 
const Float:zclass_gravity 0.8 
const Float:zclass_knockback 0.5 

new g_zclass_madness
new 
Float:last_use[33]; 

public 
plugin_init() 

    
register_plugin("[ZP] Zombie Class: Madness Zombie""0.1""WPMG Team"
    
register_clcmd("drop""use_skill"


public 
plugin_precache() 

    
g_zclass_madness zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback


public 
zp_user_infected_post(idinfector

    if(
zp_get_user_zombie_class(id) == g_zclass_madness
    { 
        
client_printcolor(id"^4[ZP] ^1Press ^4^"G^" ^1for use your madness."
        
last_use[id] = 0.0 
    



public 
use_skill(id

    if(
is_user_alive(id) && !zp_get_user_nemesis(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_madness)) 
    { 
        if((
last_use[id] + 15.0 <= get_gametime())) 
        { 
            
last_use[id] = get_gametime(); 

            
zp_force_buy_extra_item(id21

            return 
PLUGIN_HANDLED
        } 
    } 
    return 
PLUGIN_CONTINUE


stock client_printcolor(const id, const input[], any:...) 

    new 
iCount 1iPlayers[32
    static 
szMsg[191

    
vformat(szMsgcharsmax(szMsg), input3
    
replace_all(szMsg190"/g""^4"
    
replace_all(szMsg190"/y""^1"
    
replace_all(szMsg190"/t""^3"
    
replace_all(szMsg190"/w""^0"

    if(
idiPlayers[0] = id 
    
else get_players(iPlayersiCount"ch"

    for(new 
0iCounti++) 
    { 
        if(
is_user_connected(iPlayers[i])) 
        { 
            
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _iPlayers[i]) 
            
write_byte(iPlayers[i]) 
            
write_string(szMsg
            
message_end() 
        } 
    } 
}  
In second zombie please make its gravity 392.  
Prabhnoor is online now  Report Post    

Kakarot47
Senior Member
 Kakarot47
's Avatar
Join Date: May 2015
Location: Pakistan
    
 Old Yesterday , 05:57 AM   Re: Zombie with admin flag
Reply With Quote  Multi-Quote This Message  Quick reply to this message #2
Which admin access ? (FLAG ?)
__________________
My Twitter



Zombie Plague 4.3 Fix5a Latest Version
AssasinSniperNightmare ModArmageddon ModApolacyps Mod
Kakarot47 is offline  Report Post    
Send a message via Skype™ to Kakarot47    

Prabhnoor
Junior Member
Join Date: Jun 2016
    
 Old Yesterday , 06:11 AM   Re: Zombie with admin flag
Edit/Delete Message  Reply With Quote  Multi-Quote This Message  Quick reply to this message #3
I wanna say that admin flag means access flags that admin admin has like abcdegh etc. I wanna keep zombies for access flags
Prabhnoor is online now  Report Post    

Kakarot47
Senior Member
 Kakarot47'
s Avatar
Join Date
May 2015
Location
Pakistan
    
 Old Yesterday 
06:31 AM   ReZombie with admin flag
Reply With Quote  Multi
-Quote This Message  Quick reply to this message #4
i understand but which flag ?

Only 1 flag will register 

Choose any 1 flag
__________________
My Twitter



Zombie Plague 4.3 Fix5a Latest Version
AssasinSniperNightmare ModArmageddon ModApolacyps Mod
Last edited by Kakarot47
Yesterday at 06:31 AM.
Kakarot47 is offline  Report Post    
Send a message via Skype™ to Kakarot47    

Prabhnoor
Junior Member
Join Date
Jun 2016
    
 Old Yesterday 
06:34 AM   ReZombie with admin flag
Edit
/Delete Message  Reply With Quote  Multi-Quote This Message  Quick reply to this message #5
Bro i want first zombie to be with t flag and second with s flag
(I want both zombies to have separate access)
Last edited by PrabhnoorYesterday at 11:40 AM.
Prabhnoor is online now  Report Post    

Prabhnoor
Junior Member
Join Date
Jun 2016
    
 Old Today 
04:43 AM   ReZombie with admin flag
Edit
/Delete Message  Reply With Quote  Multi-Quote This Message  Quick reply to this message #6
Can you make it? (Pls)
Prabhnoor is online now  Report Post    

ZdubZ0r
Senior Member
Join Date
Feb 2011
Location
Romania
    
 Old Today 
06:10 AM   ReZombie with admin flag
Reply With Quote  Multi
-Quote This Message  Quick reply to this message #7
Here you go :
Code:
#include <amxmodx> 
#include <fakemeta> 
#include <hamsandwich> 
#include <zombieplague> 

#define PLUGIN "[ZP] Class : Pain Shock Free Zombie" 
#define VERSION "1.2.3" 
#define AUTHOR "Fry!" 

#define ADMIN ADMIN_LEVEL_H
const OFFSET_LINUX 
const OFFSET_PAINSHOCK 108 // ConnorMcLeod 

new const zclass_name[] = "Putin" 
new const zclass_info[] = "\wHealth + \rPain Shock Free" 
new const zclass_model[] = "zombie_source" 
new const zclass_clawmodel[] = "v_knife_zombie.mdl" 
const zclass_health 10000 
const zclass_speed 190 
const Float:zclass_gravity 0.350 
const Float:zclass_knockback 0.0 

new g_zclass_pain_shock_free 
new bool:g_has_pain_shock_free[33

public 
plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
     
    
register_cvar("zp_zclass_pain_shock_free",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY
     
    
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage_Post"1


public 
plugin_precache() 

    
g_zclass_pain_shock_free zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback


public 
zp_user_infected_pre(id)
{
    if(
zp_get_user_next_class(id) != g_zclass_pain_shock_free) return; //not our current class id
    
if(get_user_flags(id) & ADMIN) return; //flag match, we are (admin, vip).
    
zp_set_user_zombie_class(id0//we set to default zombie class. in this case we need a public zombie class that everyone can use it.
    
client_print(idprint_chat"Oppss! this zombie class is for ADMINS only."//print some info.
}

public 
zp_user_infected_post(playerinfector

    if (
zp_get_user_zombie_class(player) == g_zclass_pain_shock_free
    { 
        
g_has_pain_shock_free[player] = true 
    



public 
fw_TakeDamage_Post(id

    if (!
is_user_alive(id) || !zp_get_user_zombie(id)) 
        return 
HAM_IGNORED 
         
    
if (zp_get_user_zombie_class(id) != g_zclass_pain_shock_free
        return 
HAM_IGNORED 
         
    g_has_pain_shock_free
[id] = true 
         
    set_pdata_float
(idOFFSET_PAINSHOCK1.0OFFSET_LINUX
     
    return 
HAM_IGNORED 

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE 
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par } 
*/
Last edited by ZdubZ0rToday at 06:11 AM.
ZdubZ0r is offline  Report Post    
Send a message via Yahoo to ZdubZ0r Send a message via Skype™ to ZdubZ0r    

Prabhnoor
Junior Member
Join Date
Jun 2016
    
 Old Today 
07:57 AM   ReZombie with admin flag
Edit
/Delete Message  Reply With Quote  Multi-Quote This Message  Quick reply to this message #8
Thx for one zombie but you can make other zombie also?
Prabhnoor is online now  Report Post    
Reply    
AlliedModders Forum Index 
AMX Mod X Plugins High-Traffic Plugins Zombie Plague Mod

« Previous Thread 
Next Thread »

 Quick Reply
Message
:
Remove Text Formatting
    
Bold
Italic
Underline
    

    
    
Insert Link
Insert Image 


(Will ofcourse donate to alliedmodders very usefull site love it )
Prabhnoor is offline
ZdubZ0r
Senior Member
Join Date: Feb 2011
Location: Romania
Old 06-28-2016 , 10:09   Re: Zombie with admin flag
Reply With Quote #10

Here it is
Code:
#include <amxmodx>  
#include <fakemeta>  
#include <zombieplague>  

new const zclass_name[] = "Spendor"  
new const zclass_info[] = "Free madness"  
new const zclass_model[] = "zombie_source"  
new const zclass_clawmodel[] = "v_knife_zombie.mdl"  
const zclass_health = 10000  
const zclass_speed = 275  
const Float:zclass_gravity = 0.8  
const Float:zclass_knockback = 0.5  

new g_zclass_madness;  
new Float:last_use[33];  

#define ADMIN ADMIN_LEVEL_H

public plugin_init()  
{  
    register_plugin("[ZP] Zombie Class: Madness Zombie", "0.1", "WPMG Team")  
    register_clcmd("drop", "use_skill")  
}  

public plugin_precache()  
{  
    g_zclass_madness = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)  
}  

public zp_user_infected_pre(id)
{
    if(zp_get_user_next_class(id) != g_zclass_madness) return; //not our current class id
    if(get_user_flags(id) & ADMIN) return; //flag match, we are (admin, vip).
    
    zp_set_user_zombie_class(id, 0) //we set to default zombie class. in this case we need a public zombie class that everyone can use it.
    client_print(id, print_chat, "Oppss! this zombie class is for ADMINS only.") //print some info.
}

public zp_user_infected_post(id, infector)  
{  
    if(zp_get_user_zombie_class(id) == g_zclass_madness)  
    {  
        client_printcolor(id, "^4[ZP] ^1Press ^4^"G^" ^1for use your madness.")  
        last_use[id] = 0.0  
    }  
}  

public use_skill(id)  
{  
    if(is_user_alive(id) && !zp_get_user_nemesis(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_zclass_madness))  
    {  
        if((last_use[id] + 15.0 <= get_gametime()))  
        {  
            last_use[id] = get_gametime();  

            zp_force_buy_extra_item(id, 2, 1)  

            return PLUGIN_HANDLED;  
        }  
    }  
    return PLUGIN_CONTINUE;  
}  

stock client_printcolor(const id, const input[], any:...)  
{  
    new iCount = 1, iPlayers[32]  
    static szMsg[191]  

    vformat(szMsg, charsmax(szMsg), input, 3)  
    replace_all(szMsg, 190, "/g", "^4")  
    replace_all(szMsg, 190, "/y", "^1")  
    replace_all(szMsg, 190, "/t", "^3")  
    replace_all(szMsg, 190, "/w", "^0")  

    if(id) iPlayers[0] = id  
    else get_players(iPlayers, iCount, "ch")  

    for(new i = 0; i < iCount; i++)  
    {  
        if(is_user_connected(iPlayers[i]))  
        {  
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, iPlayers[i])  
            write_byte(iPlayers[i])  
            write_string(szMsg)  
            message_end()  
        }  
    }  
}
ZdubZ0r is offline
Send a message via Yahoo to ZdubZ0r Send a message via Skype™ to ZdubZ0r
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 12:46.


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