get_user_weapons sets the third parameter to 0 before counting
This commit is contained in:
parent
32b0c93539
commit
b300c1dfe2
|
@ -440,6 +440,7 @@ static cell AMX_NATIVE_CALL get_user_weapons(AMX *amx, cell *params) /* 3 param
|
||||||
if (pPlayer->ingame){
|
if (pPlayer->ingame){
|
||||||
cell *cpNum = get_amxaddr(amx,params[3]);
|
cell *cpNum = get_amxaddr(amx,params[3]);
|
||||||
cell *cpIds = get_amxaddr(amx,params[2]);
|
cell *cpIds = get_amxaddr(amx,params[2]);
|
||||||
|
*cpIds = 0;
|
||||||
int weapons = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
int weapons = pPlayer->pEdict->v.weapons & ~(1<<31); // don't count last element
|
||||||
for(int i = 1; i < MAX_WEAPONS; ++i){
|
for(int i = 1; i < MAX_WEAPONS; ++i){
|
||||||
if (weapons & (1<<i)) {
|
if (weapons & (1<<i)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user