Thanks for all the replys so far,
i'm still having trouble with this i did manage to get past the runtime error but run into another problem, it doesn't seem to remove the ammo?
heres what i've got,
Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN "Test rip ammo"
#define VERSION "1.1 rc5"
#define AUTHOR "TEST"
#define free 10
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(float(free),"list_users",_,_,_,"b")
}
public list_users(id){
new Player[32], PlayerCount
get_players(Player, PlayerCount, "ach")
for (new i = 0; i <= PlayerCount; i++) {
if ( is_user_connected(Player[i]) ) {
new weapons[32],wep[32],inum
get_user_weapons(Player[i],weapons,inum)
get_weaponname(weapons[i],wep,32)
cs_set_weapon_ammo(wep[i], 0)
set_hudmessage(255, 255, 255, 0.11, 0.31, 0, 6.0, 5.0)
show_hudmessage(Player[i], "This should have stolen your ammo for the %s",wep[i])
}
}
}
thanks in advance
xcalibar