Try this:
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /sprite","ShowSprite")
}
public plugin_precache()
{
precache_model("sprites/weapon.spr")
}
public ShowSprite(id){
static Float:origin[3]
entity_get_vector(id,EV_VEC_origin,origin)
static ent
ent = create_entity("info_target")
if(ent)
{
entity_set_string(ent,EV_SZ_classname,"info_sprite") // entity classname, put what do you want here or leave it info_sprite...
entity_set_model(ent,"sprites/weapon.spr") // path to the sprite
entity_set_int(ent,EV_INT_solid,SOLID_NOT) // not solid
entity_set_int(ent,EV_INT_movetype,MOVETYPE_NONE) // don't move
set_rendering(ent, kRenderFxNoDissipation, 0,0,0, kRenderGlow, 255) // put this to remove the black background of the sprite
entity_set_origin(ent,origin) // put your origin here : Float:{X , Y , Z}
}
}
It will create the sprite at the current player's position.
Also you don't need the "sprite" variable.
__________________