Raised This Month: $ Target: $400
 0% 

How can i add a restriction


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
adrenaline02
Junior Member
Join Date: Sep 2018
Old 12-30-2023 , 08:31   How can i add a restriction
Reply With Quote #1

I use this zombie class : https://forums.alliedmods.net/showthread.php?t=110301
How can I add a restriction for sniper/survivor mode and for first respawn not always
There is the code:
Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <zombieplague>

// Zombie Attributes
new const zclass_name[] = { "Infecter Zombie" } // name
new const zclass_info[] = { "Infection bomb -HP +speed" } // description
new const zclass_model[] = { "zombie_eye" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 50 // health
const zclass_speed = 350 // speed
const Float:zclass_gravity = 0.8 // gravity
const Float:zclass_knockback = 0.6 // knockback

new g_zclass_infecter, Ammo

public plugin_init(){
    Ammo = register_cvar("zp_infecter_amt", "3")
}

public plugin_precache()
{
    register_plugin("[ZP] Zombie Class: Infecter Zombie", "1.2", "Zombiezzz") 
    
    g_zclass_infecter = 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_infecter)
    {
        client_print(id, print_chat, "[ZP] You've chosen Infecter Zombie, good luck!")
        give_item (id, "weapon_hegrenade")
        cs_set_user_bpammo(id, CSW_HEGRENADE, get_pcvar_num(Ammo))
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Last edited by adrenaline02; 12-30-2023 at 08:40.
adrenaline02 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 00:32.


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