AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How can i add a restriction (https://forums.alliedmods.net/showthread.php?t=345127)

adrenaline02 12-30-2023 08:31

How can i add a restriction
 
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 }
*/



All times are GMT -4. The time now is 00:32.

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