diff --git a/src/zr/weapons/weapons.inc b/src/zr/weapons/weapons.inc index fa00b47..8a00c9a 100644 --- a/src/zr/weapons/weapons.inc +++ b/src/zr/weapons/weapons.inc @@ -482,6 +482,12 @@ stock WeaponsNameToIndex(const String:weapon[]) */ stock WeaponsEntityToDisplay(const String:entityname[], String:display[], displaymaxlen, noprefix = false) { + // Check if weapon data is loaded. + if (arrayWeapons == INVALID_HANDLE) + { + return -1; + } + decl String:weaponentity[WEAPONS_MAX_LENGTH]; // Initialize string to null.