Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <amxmisc>
#include <string>
#include <fun>
#define TE_FIREFIELD 123
public plugin_init()
{
register_plugin("stuff","Beta","Stephen")
register_clcmd(".fx.fxFireField","fieldfire",ADMIN_ALL,"[radius], [sprite], [count], [flags], [duration]")
return PLUGIN_CONTINUE;
}
new smoke
public fieldfire(id, level, cid, radius, count, flags, duration)
{
if(!cmd_access(id,level,cid,5))
return PLUGIN_HANDLED
new user[33], space[1], many[1], dothat[1], life[1]
read_argv(0, user, 32)
read_argv(1, space, 33)//RADIUS
new radius = str_to_num(space)
read_argv(2, many, 33)//count
new count = str_to_num(many)
read_argv(3, dothat, 33)//flags
new flags = str_to_num(dothat)
read_argv(4, life, 33)//flags
new duration = str_to_num(life)
new spriteorigin[3]
get_user_origin(id, spriteorigin);
message_begin(MSG_BROADCAST,SVC_TEMPENTITY, spriteorigin);
write_byte( TE_FIREFIELD );
write_coord( spriteorigin[0] ); //coord coord coord (position)
write_coord( spriteorigin[1] );
write_coord( spriteorigin[2] );
write_short( radius ); //Radius
write_short( smoke );
write_byte( count ); // count
write_byte( flags ); //flags
write_byte( duration ); // duration in sec.
message_end();
return PLUGIN_HANDLED
}
//Precaching Sprites
//==================================
public plugin_precache()
{
smoke = precache_model("sprites/smoke.spr");
return PLUGIN_HANDLED
}
.fx.fxFireField 100 "sprites"<--- 5 2 100 : that i can choose an other sprite instead of recompiling it with an other sprite ?
cause all the other stuff works but im binded to that 1 one sprite. >_>