Raised This Month: $32 Target: $400
 8% 

API Scripting Help Change the zombie class


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mihai94
Junior Member
Join Date: Feb 2018
Old 03-05-2018 , 17:26   Change the zombie class
Reply With Quote #1

Hello, this ghost zombie class can be changed so its ability to be used only for 50 seconds after the 50 seconds expires to wait for another 30 seconds before it can use its ability again.

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fun>
#include <zombie_plague_special>
#include <zombiexp>

#define flag_get(%1,%2) (%1 & (1 << (%2 & 31)))
#define flag_get_boolean(%1,%2) (flag_get(%1,%2) ? true : false)
#define flag_set(%1,%2) %1 |= (1 << (%2 & 31))
#define flag_unset(%1,%2) %1 &= ~(1 << (%2 & 31))

new const zclass_name[] = { "NoCip Zombie" }
new const 
zclass_info[] = { "Move Anywhere" }
new const 
zclass_model[] = { "zombie_source" }
new const 
zclass_clawmodel[] = { "v_knife_zombie.mdl" }
const 
zclass_health 1
const zclass_speed 190
const Float:zclass_gravity 1.0
const Float:zclass_knockback 1.0
const zclass_level 19 

new g_IdClassg_IsNoClipZm

public plugin_precache()
{
g_IdClass zpxp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_level)
}

public 
plugin_init()
{
RegisterHam(Ham_Spawn"player""PlayerSpawnPost"1)
}

public 
client_putinserver(id)
{
flag_unset(g_IsNoClipZm,id)
}

public 
client_disconnect(id)
{
flag_unset(g_IsNoClipZm,id)
}

public 
PlayerSpawnPost(id)
{
if(!
is_user_alive(id)) return;
    
flag_unset(g_IsNoClipZm,id)
if(
get_user_noclip(id)) set_user_noclip(id);
}

public 
zp_user_infected_post(idinfector)
{
if(
zp_get_user_nemesis(id)) return;
    
if(
zp_get_user_zombie_class(id) == g_IdClass)
{
client_print(idprint_chat"[FANTOMA] Ai Clasa Fantoma poti trece cu usurinta prin ziduri.")
flag_set(g_IsNoClipZm,id)
set_user_noclip(id1)
}
}

public 
zp_user_humanized_post(id)
{
if(
flag_get(g_IsNoClipZm,id))
{
flag_unset(g_IsNoClipZm,id)
set_user_noclip(id)
}

Mihai94 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 19:27.


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