-
Автор темы
- #1
put it in player_death in fireeventclientside
C++:
if (attacker == localplayer)
{
if (strstr(gameevent->get_string("weapon"), "knife"))
{
switch (yourskinint)
{
case 0:
gameevent->set_string("weapon", "bayonet");
break;
case 1:
gameevent->set_string("weapon", "knife_survival_bowie");
break;
case 2:
gameevent->set_string("weapon", "knife_butterfly");
break;
case 3:
gameevent->set_string("weapon", "knife_falchion");
break;
case 4:
gameevent->set_string("weapon", "knife_flip");
break;
case 5:
gameevent->set_string("weapon", "knife_gut");
break;
case 6:
gameevent->set_string("weapon", "knife_tactical");
break;
case 7:
gameevent->set_string("weapon", "knife_karambit");
break;
case 8:
gameevent->set_string("weapon", "knife_m9_bayonet");
break;
case 9:
gameevent->set_string("weapon", "knife_push");
break;
case 10:
gameevent->set_string("weapon", "knife_gypsy_jackknife");
break;
case 11:
gameevent->set_string("weapon", "knife_stiletto");
break;
case 12:
gameevent->set_string("weapon", "knife_ursus");
break;
case 13:
gameevent->set_string("weapon", "knife_widowmaker");
break;
case 14:
gameevent->set_string("weapon", "knife_css");
break;
case 15:
gameevent->set_string("weapon", "knife_skeleton");
break;
case 16:
gameevent->set_string("weapon", "knife_outdoor");
break;
case 17:
gameevent->set_string("weapon", "knife_canis");
break;
case 18:
gameevent->set_string("weapon", "knife_cord");
break;
}
}
}
if you have a problem like this
change gameevent class
C++:
class GameEvent
{
public:
virtual ~GameEvent() = 0;
virtual const char *GetName() const = 0;
virtual bool IsReliable() const = 0;
virtual bool IsLocal() const = 0;
virtual bool IsEmpty(const char *keyName = NULL) = 0;
virtual bool GetBool(const char *keyName = NULL, bool defaultValue = false) = 0;
virtual int GetInt(const char *keyName = NULL, int defaultValue = 0) = 0;
virtual unsigned long GetUint64(const char *keyName = NULL, unsigned long defaultValue = 0) = 0;
virtual float GetFloat(const char *keyName = NULL, float defaultValue = 0.0f) = 0;
virtual const char *GetString(const char *keyName = NULL, const char *defaultValue = "") = 0;
virtual const wchar_t *GetWString(const char *keyName, const wchar_t *defaultValue = L"") = 0;
virtual void SetBool(const char *keyName, bool value) = 0;
virtual void padding() = 0;
virtual void SetInt(const char *keyName, int value) = 0;
virtual void SetUint64(const char *keyName, unsigned long value) = 0;
virtual void SetFloat(const char *keyName, float value) = 0;
virtual void SetString(const char *keyName, const char *value) = 0;
virtual void SetWString(const char *keyName, const wchar_t *value) = 0;
virtual const void* GetPtr(const char* keyname = nullptr, const void* default_values = nullptr) = 0;
virtual void SetPtr(const char* keyname, const void* value) = 0;
};