fixed some bugs in weapon stats functions

This commit is contained in:
Lukasz Wlasinksi 2004-09-21 18:04:22 +00:00
parent 0983698d2e
commit 8d06f80eeb

View File

@ -78,7 +78,7 @@ static cell AMX_NATIVE_CALL get_user_wrstats(AMX *amx, cell *params) /* 4 param
return 0;
}
int weapon = params[2];
if (weapon<0||weapon>=MAX_WEAPONS){
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
return 0;
}
@ -109,7 +109,7 @@ static cell AMX_NATIVE_CALL get_user_wstats(AMX *amx, cell *params) /* 4 param *
return 0;
}
int weapon = params[2];
if (weapon<0||weapon>=MAX_WEAPONS){
if (weapon<0||weapon>=MAX_WEAPONS+MAX_CWEAPONS){
MF_RaiseAmxError(amx,AMX_ERR_NATIVE);
return 0;
}