Raised This Month: $ Target: $400
 0% 

Blood effect/beam ... [UNANSWERED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-21-2007 , 23:41   Re: Blood effect/beam ... [URGENT]
Reply With Quote #1

For TE_BEAMPOINTS:

Code:
new from_origin[3], to_origin[3]; get_user_origin(from,from_origin); get_user_origin(to,to_origin); from_origin[2] += 16.0; // raised to_origin[2] += 16.0; // raised // ... write_coord(from_origin[0]); write_coord(from_origin[1]); write_coord(from_origin[2]); write_coord(to_origin[0]); write_coord(to_origin[1]); write_coord(to_origin[2]); // ...

If you want to change how it appears, I commented what each of the write_* things are for, so just change the values until you find what you (or your boss guy) likes.

TE_BLOODSTREAM is a little bit more complicated. Try this.

Code:
new iStart[3], Float:fStart[3], iEnd[3], Float:fEnd[3] Float:fVelocity[3]; get_user_origin(from,iStart); get_user_origin(to,iEnd); iStart[2] += 16.0; // raise iEnd[2] += 16.0; // raise IVecFVec(iStart,fStart); IVecFVec(iEnd,fEnd); get_speed_vector(fStart,fEnd,512.0,fVelocity); // 512.0 is the speed // ... write_coord(iStart[0]); write_coord(iStart[1]); write_coord(iStart[2]); write_coord(floatround(fVelocity[0])); write_coord(floatround(fVelocity[1])); write_coord(floatround(fVelocity[2])); // ...

Note that get_speed_vector is a function from GHW_Chronic's CHR Engine.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Old 02-22-2007, 04:11
Davidos
This message has been deleted by Davidos. Reason: RRRIP!
Davidos
Senior Member
Join Date: Feb 2005
Old 02-22-2007 , 04:58   Re: Blood effect/beam ... [URGENT]
Reply With Quote #3

Code:
L 02/22/2007 - 14:52:47: [ENGINE] Invalid player 0 (not in-game)
L 02/22/2007 - 14:52:47: [AMXX] Displaying debug trace (plugin "GHW_feedmod3.amxx")
L 02/22/2007 - 14:52:47: [AMXX] Run time error 10: native error (native "entity_range")
L 02/22/2007 - 14:52:47: [AMXX]    [0] engine_stocks.inc::get_entity_distance (line 65)
L 02/22/2007 - 14:52:47: [AMXX]    [1] feedmod3.sma::feed (line 82)
wtf?


Well I fixed that up there, sorry for the flame. Anyway, now the beams are flying up <And the blood stream thing wont work...

Code:
/* AMXMOD X script. * * Scripted by GHW.Chronic, edited by Davidos * *   v0.6 - Late Alpha Release * */ #include <amxmodx> #include <amxmisc> #include <fakemeta> #include <engine> #include <vault> #include <fun> #include <tsx> #include <messages> #include <chr_engine> new bool:afeed[33] new target, body new beamSpr public plugin_init() {     register_plugin("FeedMOD","0.6","GHW & Dave")     register_clcmd("say_team /feed","feed")     register_clcmd("say_team /stop","stop")     set_task(150.0,"advertise",0,"",0,"b")     return PLUGIN_HANDLED } public plugin_precache() {     precache_sound("feeding.wav")     precache_sound("ah.wav")     beamSpr = precache_model("sprites/lgtning.spr") } public client_connect(id) {     afeed[id]=false } public client_disconnect(id) {     afeed[id]=false } public stop(id) {     new args[128]     read_args(args, 127)     remove_quotes(args)     if(!afeed[id])     {         client_print(id,print_chat,"You Aren't Feeding")         return PLUGIN_HANDLED     }     else     {         afeed[id]=false         set_task(1.0,"fadeout",id)     }     return PLUGIN_HANDLED } public feed(id) {     if(afeed[id])     {         client_print(id,print_chat,"You Are Already Feeding")         return PLUGIN_HANDLED     }     else     {         if(!is_user_alive(id))         {             client_print(id,print_chat,"You Cannot Feed While Dead / In Spec ")             return PLUGIN_HANDLED         }         get_user_aiming(id, target, body)         if(get_entity_distance(id, target) > 320)         {             client_print(id,print_chat,"You aren't close enough to a player!")             return PLUGIN_HANDLED         }         else         {             afeed[id]=true             set_task(0.1, "fadeout", id)             set_task(0.2,"make_blood_info",id,"",0,"b")             client_print(id,print_center," * You Begin the feeding process * ^n")             client_print(id,print_chat,"Type /stop to stop feeding.")             emit_sound(id, CHAN_VOICE, "feeding.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)             return PLUGIN_HANDLED         }     }     return PLUGIN_HANDLED } public fadeout(id) {     if(!afeed[id])     {         set_user_rendering(id,kRenderFxNone,0,0,0,kRenderNormal,0)         set_user_maxspeed(id, 320.0)         set_user_maxspeed(target,320.0)         emit_sound(id, CHAN_VOICE, "ah.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)         client_print(id,print_center,"Time To Stop")         message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},id);         write_short(~0);         write_short(~0);         write_short(1<<12);         write_byte(0);         write_byte(0);         write_byte(0);         write_byte(0);         message_end();         message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},target);         write_short(~0);         write_short(~0);         write_short(1<<12);         write_byte(0);         write_byte(0);         write_byte(0);         write_byte(0);         message_end();         return PLUGIN_HANDLED     }     if(!is_user_alive(id))     {         afeed[id]=false         set_task(1.0,"fadeout",id)         return PLUGIN_HANDLED     }     if(!is_user_alive(target))     {         afeed[id]=false         set_task(1.0,"fadeout",id)         return PLUGIN_HANDLED     }     new health = get_user_health(id)     if(health>=300)     {         afeed[id]=false         set_task(1.0,"fadeout",id)         return PLUGIN_HANDLED     }     new healtht = get_user_health(target)     if(healtht<=10)     {         afeed[id]=false         set_task(1.0,"fadeout",id)         return PLUGIN_HANDLED     }     set_user_rendering(id,kRenderFxGlowShell,255,0,0,kRenderTransAlpha,100)     set_user_rendering(target,kRenderFxGlowShell,255,0,0,kRenderTransAlpha,50)     message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},id);     write_short(~0);     write_short(~0);     write_short(1<<12);     write_byte(200);     write_byte(0);     write_byte(0);     write_byte(30);     message_end();     message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("ScreenFade"),{0,0,0},target);     write_short(~0);     write_short(~0);     write_short(1<<12);     write_byte(200);     write_byte(0);     write_byte(0);     write_byte(30);     message_end();     set_user_maxspeed(id, 1.0)     set_user_maxspeed(target,1.0)     set_task(0.5,"heal",id)     return PLUGIN_HANDLED } public heal(id) {     new armor = get_user_armor(id)     new health = get_user_health(id)     new health2 = get_user_health(target)     new newarmor = armor + 10     new newhealth = health + 5     new newhealthz = health2 - 2     set_user_armor(id,newarmor)     set_user_health(id,newhealth)     set_user_health(target,newhealthz)     set_task(1.0,"fadeout",id)     return PLUGIN_HANDLED } public make_blood_info(id) {     if(!afeed[id])     {         return PLUGIN_HANDLED     }     else     {               new from_origin[3], to_origin[3];         get_user_origin(id,from_origin);         get_user_origin(target,to_origin);                 from_origin[2] += 0.0; // raised         to_origin[2] += 0.0; // raised                 // ...         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)         write_byte(0)         write_coord(from_origin[0]);         write_coord(from_origin[1]);         write_coord(from_origin[2]);         write_coord(to_origin[0]);         write_coord(to_origin[1]);         write_coord(to_origin[2]);         write_short(beamSpr); // sprite index         write_byte(0); // start frame         write_byte(30); // frame rate in 0.1's         write_byte(20); // life in 0.1's         write_byte(25); // line width in 0.1's         write_byte(50); // noise amplititude in 0.01's         write_byte(200); // red         write_byte(10); // green         write_byte(10); // blue         write_byte(100); // brightness         write_byte(50); // scroll speed in 0.1's         message_end();     }     return PLUGIN_HANDLED

Last edited by Davidos; 02-22-2007 at 11:54.
Davidos is offline
Old 02-22-2007, 09:00
Davidos
This message has been deleted by Davidos. Reason: Stupid quote bug -_-
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 00:44.


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