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_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
}
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()
}
}
}
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 Re: Zombie 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 Re: Zombie 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 Prabhnoor; Yesterday at 11:40 AM.
Prabhnoor is online now Report Post
Prabhnoor
Junior Member
Join Date: Jun 2016
Old Today , 04:43 AM Re: Zombie 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 Re: Zombie 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 = 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; Today 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 Re: Zombie 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