Proplem with setting view model

Hi, everyone

Today i'm trying to make dotsight for the aug, it worked, however, when i switch to another weapon, its view model is set to the aug!

Can anyone fix it for me?

Here is the code:

[php]

#include <amxmodx>

#include <amxmisc>

#include <fun>

#include <cstrike>

#include <fakemeta>

#include <fakemeta_util>

#include <engine>

#include <hamsandwich>



#define PLUGIN "Scope Dot"

#define VERSION "1.0"

#define AUTHOR "Explas"





public plugin_init() {

register_plugin(PLUGIN, VERSION, AUTHOR)

register_forward(FM_PlayerPreThink, "PlayerPreThink")



// Add your code hereClick post title for more details

}

/[php]

public plugin_precache()

{

precache_model("models/v_aug_scope.mdl")

precache_model("models/v_aug.mdl")

}



public PlayerPreThink(id)

{

if( get_user_weapon(id) == CSW_AUG)

{

if( cs_get_user_zoom(id) == CS_SET_AUGSG552_ZOOM)

{

set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, "models/v_aug_scope.mdl"))

}

if( cs_get_user_zoom(id) == CS_SET_NO_ZOOM)

{



set_pev(id, pev_viewmodel, engfunc(EngFunc_AllocString, "models/v_aug.mdl"))

}

}



}


Orignal From: Proplem with setting view model

No comments

Not a single link is allowed to submit in comment :o