Quote:
Originally Posted by WATCH_D0GS UNITED
PHP Code:
#include <amxmodx> #include <fakemeta>
new Weapon[32]
public plugin_init() { register_plugin("On_Show_Weapon_Icon","1.0","N/A") register_event("WeapPickup","Event_WeapPickup","b") }
public Event_WeapPickup(const id) { // Called when picking up a dropped weapon // Called when purchasing a weapon // NOT called when switching weapons
Weapon[id] = read_data(1) client_print(id,print_chat,"%d",Weapon[id]) }
|
Player indexes can be from 1 to 32 (assuming a 32-slot server). Indexing the
Weapon array with
id = 32 will cause an index out-of-bounds error.
Weapon should have size 33, not 32.
__________________