Skip to content

Commit

Permalink
get/set weapon cookable (from filthyfreak/badboy)
Browse files Browse the repository at this point in the history
  • Loading branch information
voron00 committed Oct 15, 2017
1 parent eec2e57 commit 20f0643
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gsc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ scr_function_t scriptFunctions[] =
{"setweaponreloadtime", gsc_weapons_setweaponreloadtime, 0},
{"getweaponreloademptytime", gsc_weapons_getweaponreloademptytime, 0},
{"setweaponreloademptytime", gsc_weapons_setweaponreloademptytime, 0},
{"getweaponcookable", gsc_weapons_getweaponcookable, 0},
{"setweaponcookable", gsc_weapons_setweaponcookable, 0},
{"getweaponhitlocmultiplier", gsc_weapons_getweaponhitlocmultiplier, 0},
{"setweaponhitlocmultiplier", gsc_weapons_setweaponhitlocmultiplier, 0},
{"getloadedweapons", gsc_weapons_getloadedweapons, 0},
Expand Down
10 changes: 10 additions & 0 deletions gsc_weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ void gsc_weapons_setweaponreloademptytime()
gsc_weapons_setweaponoffsetint("setweaponreloademptytime", 540);
}

void gsc_weapons_getweaponcookable()
{
gsc_weapons_getweaponoffsetint("getweaponcookable", 828);
}

void gsc_weapons_setweaponcookable()
{
gsc_weapons_setweaponoffsetint("setweaponcookable", 828);
}

char* hitlocs[] = { "none", "helmet", "head", "neck", "torso_upper", "torso_lower", "right_arm_upper", "right_arm_lower", "right_hand", "left_arm_upper", "left_arm_lower", "left_hand", "right_leg_upper", "right_leg_lower", "right_foot", "left_leg_upper", "left_leg_lower", "left_foot", "gun" };
int getHitLocOffset(char* hitloc)
{
Expand Down
2 changes: 2 additions & 0 deletions gsc_weapons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ void gsc_weapons_getweaponreloadtime();
void gsc_weapons_setweaponreloadtime();
void gsc_weapons_getweaponreloademptytime();
void gsc_weapons_setweaponreloademptytime();
void gsc_weapons_getweaponcookable();
void gsc_weapons_setweaponcookable();
void gsc_weapons_getweaponhitlocmultiplier();
void gsc_weapons_setweaponhitlocmultiplier();
void gsc_weapons_getloadedweapons();
Expand Down

0 comments on commit 20f0643

Please sign in to comment.