Raised This Month: $ Target: $400
 0% 

Use custom Sprite there when precached


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Charr
Senior Member
Join Date: Jul 2005
Location: Long Island, New York, U
Old 03-07-2006 , 14:27  
Reply With Quote #7

Stupid mistakes, my bad:
Code:
#include <amxmodx> #include <engine> #include <fakemeta> #include <amxmisc> #include <string> #include <fun> #define TE_FIREFIELD 123 new gSpr[3],smoke; public plugin_init() {     register_plugin("stuff","Beta","Stephen")     register_clcmd(".fx.fxFireField","fieldfire",ADMIN_ALL,"[radius], [sprite], [count], [flags], [duration]")     return PLUGIN_CONTINUE; } public fieldfire(id, level, cid) {     if(!cmd_access(id,level,cid,5))             return PLUGIN_HANDLED     new sprite[33],space[32], many[32], dothat[32], life[32]     read_argv(1, space, 33)//RADIUS     new radius = str_to_num(space)     read_argv(2,sprite,31);     read_argv(3, many, 33)//count     new count = str_to_num(many)     read_argv(4, dothat, 33)//flags     new flags = str_to_num(dothat)     read_argv(5, 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     if(equali(sprite,"smoke"))     {         write_short( smoke );     }     else if(equali(sprite,"1"))     {         write_short(gSpr[0]);     }     else if(equali(sprite,"2"))     {         write_short(gSpr[1]);     }     else if(equali(sprite,"3"))     {         write_short(gSpr[2]);     }     else     {         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");     gSpr[0] = precache_model("sprites/1.spr");     gSpr[1] = precache_model("sprites/2.spr");     gSpr[2] = precache_model("sprites/3.spr");         return PLUGIN_HANDLED }
__________________
Charr is offline
Send a message via AIM to Charr Send a message via MSN to Charr
 



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