Raised This Month: $ Target: $400
 0% 

Use custom Sprite there when precached


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Stephen
Senior Member
Join Date: Aug 2004
Old 03-06-2006 , 08:13   Use custom Sprite there when precached
Reply With Quote #1

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 }

How can i make it that when i type in the console
.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. >_>
So HOW is that possible ?
Stephen is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:21.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode