Raised This Month: $ Target: $400
 0% 

Tornado wont spawn...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-16-2005 , 19:53   Tornado wont spawn...
Reply With Quote #1

Ok this little plugin is supposed to spwn a tornado or atleast do something..but it does nothing :/ I get no error messages or anything :/


Code:
#include <amxmodx> #include <amxmisc> #include <engine> new origin[3] new Float:vOrigin[3] new distanceBetween new tornado_model new alreadySpawned[33] public plugin_init() {     register_plugin( "Tornado", "1.0", "Zenith77" )     register_clcmd("amx_tornado", "tornado", ADMIN_IMMUNITY, "Produces are tornado where you are aiming!" )     register_cvar( "tornado_radius", "500" ) } public plugin_precache() {         tornado_model = precache_model( "sprites/xsmoke4.spr" ) } public tornado(id, level, cid) {         if (!cmd_access(id,level,cid,1)) {         return PLUGIN_HANDLED     }     new name[32], authid[32]         get_user_name(id, name, 31)     get_user_authid(id, authid, 31)             if( alreadySpawned[id] == 1 ) {         server_print( " [TORNADO] ************************WARNING************************* [TORNADO]" )         server_print( "" )         server_print( " [TORNADO] **WARNING** ADMIN %s has spawned more than on tornado at a time! ", name )         server_print( " [TORNADO] This can cause your server to lag or crash! Clients reliable channel can also be overflowed!" )         server_print( "" )         server_print( " [TORNADO] ************************WARNING************************* [TORNADO]" )                 client_print(id, print_chat, " [TORNADO] **WARNING** More than one tornado was spawned! Crash or Reliable Channel Overflow possible!" )                 log_amx( " [TORNADO] **WARNING** ADMIN %s with AUTHID: %s Spawned more than one tornado! Server Crash or Reliable Channel Overflow possible!", name, authid )     }         server_print( " [TORNADO] ADMIN %s with AUTHID %s attempted to spawn a tornado!" )         get_user_origin(id, origin, 3)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY) // TE_LARGEFUNNEL     write_byte(100)     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     write_short(tornado_model)     message_end()         server_print( " [TORNADO] <%s> <> <%s>  Tornado Successfuly Spawned! ",name, authid )         alreadySpawned[id] = 1         for ( new x = 1; x <=get_maxplayers(); x++) {         if ( is_user_alive(x) && get_user_team(id) != get_user_team(x)) {                         entity_get_vector(x, EV_VEC_origin, vOrigin)                         distanceBetween = get_distance(origin, vOrigin )                         if ( distanceBetween <= get_cvar_num("tornado_radius") ) {                                 set_user_velocity(x,origin)                                                 for( new i = 0; i < 500; i++ ) {                     if( distanceBetween <10 ) {                         user_kill(x)                     }                 }             }         }     }         return PLUGIN_HANDLED }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Meatwad
Senior Member
Join Date: Jul 2004
Location: New york, LI
Old 09-16-2005 , 20:42  
Reply With Quote #2

I don't understand what it's supposed to do.
__________________
http://googlefoundfunniest.ytmnd.com/

If you like Aqua Teen Hunger Force, then paste this onto your forehead. (Laugh out loud.)

Admin Weapons II
Meatwad is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-16-2005 , 21:11  
Reply With Quote #3

spwn a tornado..and then if a client is within a certain radius it sucks them in and kills them.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-16-2005 , 21:32  
Reply With Quote #4

TE_LARGEFUNNEL takes three coords (origin), a short (sprite), and then another short (flags). It looks like you only use one short. Try another write_short(0); at the end.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-16-2005 , 22:41  
Reply With Quote #5

what are the flags?

it still wont work :/
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 09-17-2005 , 17:46  
Reply With Quote #6

bump

Code:
#include <amxmodx> #include <amxmisc> #include <engine> new origin[3] new Float:vOrigin[3] new distanceBetween new tornado_model new alreadySpawned[33] public plugin_init() {     register_plugin( "Tornado", "1.0", "Zenith77" )     register_clcmd("amx_tornado", "tornado", ADMIN_IMMUNITY, "Produces are tornado where you are aiming!" )     register_cvar( "tornado_radius", "500" ) } public plugin_precache() {         tornado_model = precache_model( "sprites/xsmoke4.spr" ) } public tornado(id, level, cid) {         if (!cmd_access(id,level,cid,1)) {         return PLUGIN_HANDLED     }     new name[32], authid[32]         get_user_name(id, name, 31)     get_user_authid(id, authid, 31)             if( alreadySpawned[id] == 1 ) {         server_print( " [TORNADO] ************************WARNING************************* [TORNADO]" )         server_print( "" )         server_print( " [TORNADO] **WARNING** ADMIN %s has spawned more than on tornado at a time! ", name )         server_print( " [TORNADO] This can cause your server to lag or crash! Clients reliable channel can also be overflowed!" )         server_print( "" )         server_print( " [TORNADO] ************************WARNING************************* [TORNADO]" )                 client_print(id, print_chat, " [TORNADO] **WARNING** More than one tornado was spawned! Crash or Reliable Channel Overflow possible!" )                 log_amx( " [TORNADO] **WARNING** ADMIN %s with AUTHID: %s Spawned more than one tornado! Server Crash or Reliable Channel Overflow possible!", name, authid )     }         server_print( " [TORNADO] ADMIN %s with AUTHID %s attempted to spawn a tornado!" )         get_user_origin(id, origin, 3)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY) // TE_LARGEFUNNEL     write_byte(100)     write_coord(origin[0])     write_coord(origin[1])     write_coord(origin[2])     write_short(tornado_model)     write_short(0)     message_end()         server_print( " [TORNADO] <%s> <> <%s>  Tornado Successfuly Spawned! ",name, authid )         alreadySpawned[id] = 1         for ( new x = 1; x <=get_maxplayers(); x++) {         if ( is_user_alive(x) && get_user_team(id) != get_user_team(x)) {                         entity_get_vector(x, EV_VEC_origin, vOrigin)                         distanceBetween = get_distance(origin, vOrigin )                         if ( distanceBetween <= get_cvar_num("tornado_radius") ) {                                 set_user_velocity(x,origin)                                                 for( new i = 0; i < 500; i++ ) {                     if( distanceBetween <10 ) {                         user_kill(x)                     }                 }             }         }     }         return PLUGIN_HANDLED }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 09-17-2005 , 22:07  
Reply With Quote #7

a) The last write_short is 1 if the funnel flows in reverse, 0 otherwise.

b) Do all of the other messages appear properly, it's just that the funnel is not showing up, or is the command not working at all?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Reply



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 09:08.


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