|
Senior Member
|
06-05-2020
, 05:36
Re: access flags that have knifes
|
#15
|
Quote:
Originally Posted by supertrio17
Thanks for waiting, it's tested and working, hope it works for you
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Flag Knife Model"
#define VERSION "1.1"
#define AUTHOR "Mr. Boopsy"
#define FLAG_HERE "t" //you change needed flag here
#define V_KNIFE "models/knife_t.mdl" //you change your path to model here
public plugin_precache()
{
precache_model(V_KNIFE)
}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("CurWeapon", "knife", "be", "1=1")
}
public knife(id)
{
new is_knife = read_data(2)
if(has_flag(id, FLAG_HERE))
{
if(is_knife == CSW_KNIFE)
{
set_pev(id, pev_viewmodel2, V_KNIFE);
//set_pev(id, pev_weaponmodel2, V_KNIFE); //remove first "//" if you use weapon model, its a model that other players see
}
}
}
|
Thank you,Can you also make it for vip model? with access t
|
|
|
|