Raised This Month: $ Target: $400
 0% 

can't get cs_get_armoury_type to work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AndraX2000
Member
Join Date: Mar 2006
Location: 39°57' N 83°14' W
Old 03-27-2006 , 20:47  
Reply With Quote #1

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.
AndraX2000 is offline
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 03-27-2006 , 20:55  
Reply With Quote #2

maybe I took a wrong reading last time, somehow messed up, i dunno, workd now, appologeaze to hawk for making him waste his time by having to go find a giant what sign.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 03-27-2006 , 21:05  
Reply With Quote #3

The Second Best Page in the Universe
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 16:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode