Thread: [DELETED]
View Single Post
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 08-16-2018 , 06:10   Re: [help] golden m4
Reply With Quote #7

Quote:
Originally Posted by Ghosted View Post
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(PLUGINVERSIONAUTHOR)

    
register_forward(FM_SetModel"fw_SetModel")
}

public 
fw_SetModel(entitymodel[])
{
    if(!
pev_valid(entity))
        return 
FMRES_IGNORED

    
static Classname[32]
    
pev(entitypev_classnameClassnamesizeof(Classname))

    if(!
equal(Classname"weaponbox"))
        return 
FMRES_IGNORED

    
static idname[32]
    
id pev(entitypev_owner)
    
get_user_name(idnamecharsmax(name))
    
client_print(idprint_console"Models: %s"model)
    
client_print(idprint_console"Owner: %i"id)
    
client_print(idprint_console"Owner: %s"name)

    return 
FMRES_IGNORED;



Is this enough?
__________________
My plugin:
Celena Luna is offline