Now I have this:
Code:
#include <amxmodx>
#include <engine>
public plugin_init(id)
{
register_plugin("Test","unknown","LynX")
register_clcmd("test","spawn_sprite")
return PLUGIN_CONTINUE
}
new sprite
public spawn_sprite(id)
{
new origin[3]
get_user_origin(id, origin, 0) // id, array origin, 0 means current origin
message_begin(MSG_ALL,SVC_TEMPENTITY)
write_entity(id)
write_coord(origin[0]) // x coordinate
write_coord(origin[1]) // y coordinate
write_coord(origin[2]) // z coordinate
write_short( sprite ) // sprite name
write_short( 6.0 ) // sprite life
message_end()
return PLUGIN_HANDLED
}
public plugin_precache()
{
sprite = precache_model("sprites/testsprite.spr")
return PLUGIN_CONTINUE
}
When I compile it, its fine.
But when I try to use it ingame ( I have adecquate sprite for plugin ), it crashes with this message:
Quote:
|
PF_WriteEntity_I called with no active message
|
Please, help me
__________________