SF API | GET WEAPON NAME BY MODEL ID

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
// int userWeaponID = SF->getGame()->actorInfoGet(ACTOR_SELF, -1)->weapon_model;
// std::string userWeaponName = get_weapon_name_by_id(userWeaponID);
std::string get_weapon_name_by_id(int userWeaponID)
{
std::string userWeaponName;
switch (userWeaponID)
{
case 0:
userWeaponName = "Duke";
break;
case 1:
userWeaponName = "Brass Knuckles";
break;
case 2:
userWeaponName = "Golf Club";
break;
case 3:
userWeaponName = "Nite Stick";
break;
case 4:
userWeaponName = "Knife";
break;
case 5:
userWeaponName = "Baseball";
break;
case 6:
userWeaponName = "Shovel";
break;
case 7:
userWeaponName = "Pool Cue";
break;
case 8:
userWeaponName = "Katana";
break;
case 9:
userWeaponName = "Chainsaw";
break;
case 10:
userWeaponName = "Dildo";
break;
case 11:
userWeaponName = "Dildo";
break;
case 12:
userWeaponName = "Dildo";
break;
case 13:
userWeaponName = "Dildo";
break;
case 14:
userWeaponName = "Flowers";
break;
case 15:
userWeaponName = "Cane";
break;
case 16:
userWeaponName = "Grenade";
break;
case 17:
userWeaponName = "Tear Gas";
break;
case 18:
userWeaponName = "Molotov";
break;
case 19:
userWeaponName = "";
break;
case 20:
userWeaponName = "";
break;
case 21:
userWeaponName = "";
break;
case 22:
userWeaponName = "Pistol";
break;
case 23:
userWeaponName = "Silencer";
break;
case 24:
userWeaponName = "Desert Eagle";
break;
case 25:
userWeaponName = "Shotgun";
break;
case 26:
userWeaponName = "SawnOff";
break;
case 27:
userWeaponName = "Spas12";
break;
case 28:
userWeaponName = "Tec9";
break;
case 29:
userWeaponName = "MP5";
break;
case 30:
userWeaponName = "AK - 47";
break;
case 31:
userWeaponName = "M4";
break;
case 32:
userWeaponName = "Molotov";
break;
case 33:
userWeaponName = "Rifle";
break;
case 34:
userWeaponName = "Sniper";
break;
case 35:
userWeaponName = "Rocket Launcher";
break;
case 36:
userWeaponName = "HS Rocket Launcher";
break;
case 37:
userWeaponName = "Flamethrower";
break;
case 38:
userWeaponName = "Minigun";
break;
case 39:
userWeaponName = "C4";
break;
case 40:
userWeaponName = "Detonator";
break;
case 41:
userWeaponName = "Spray";
break;
case 42:
userWeaponName = "Fire Extinguisher";
break;
case 43:
userWeaponName = "Camera";
break;
case 44:
userWeaponName = "Nightvision";
break;
case 45:
userWeaponName = "Infrared Vision";
break;
case 46:
userWeaponName = "Parachute";
break;
default:
userWeaponName = "None";
break;
}
return userWeaponName;
};