Added array existence check in weapons module. This might fix bug 166.
This commit is contained in:
		| @@ -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. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user