Quote:
|
Originally Posted by GHW_Chronic
really, as on my CS 1.6 server win32 teame06's worked and yet yours did not. Tried them both on iceworld and his returned a bunch of numbers whilst yours only returned 23.
|
yep, here's the full code:
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#define PLUGIN "AWP to Scout"
#define VERSION "1.0"
#define AUTHOR "Andrew Penry"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_srvcmd ("amx_scour", "scour_map")
}
public scour_map() {
new entindex = -1
while (entindex = find_ent_by_class(entindex,"armoury_entity")) {
new weapType = cs_get_armoury_type(entindex)
server_print("Found an ARMOURY[%d]: %d",entindex,weapType)
}
return PLUGIN_CONTINUE
}
running amx_scour results in:
Code:
Found an ARMOURY[51]: 19
Found an ARMOURY[52]: 28
Found an ARMOURY[53]: 27
Found an ARMOURY[54]: 8
Found an ARMOURY[55]: 22
Found an ARMOURY[56]: 30
Found an ARMOURY[57]: 19
Found an ARMOURY[58]: 28
Found an ARMOURY[59]: 27
...
This is on win32. Give it a try, and let me know if it works for you. On Linux it results in all 23's (as does the code you posted). After making the change in cstrike.h and recompiling cstrike_amx_i386.so, both methods work on Linux.