Quote:
Originally Posted by Ghosted
I haven't seen code fully, g_HasM4 should work but your code wont cause weaponbox has not owner
|
PHP Code:
/* Sublime AMXX Editor v2.2 */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
// #include <xs>
// #include <sqlx>
#define PLUGIN "Test Code"
#define VERSION "1.0"
#define AUTHOR "Celena Luna"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_SetModel, "fw_SetModel")
}
public fw_SetModel(entity, model[])
{
if(!pev_valid(entity))
return FMRES_IGNORED
static Classname[32]
pev(entity, pev_classname, Classname, sizeof(Classname))
if(!equal(Classname, "weaponbox"))
return FMRES_IGNORED
static id, name[32]
id = pev(entity, pev_owner)
get_user_name(id, name, charsmax(name))
client_print(id, print_console, "Models: %s", model)
client_print(id, print_console, "Owner: %i", id)
client_print(id, print_console, "Owner: %s", name)
return FMRES_IGNORED;
}
Is this enough?
__________________