Raised This Month: $ Target: $400
 0% 

Beam Help.


Post New Thread Reply   
 
Thread Tools Display Modes
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 20:54   Re: Beam Help.
Reply With Quote #11

Blackops, Eiyh man; Why you take karma from me while asking this question...


EDIT: On top of that calling me a n00b, I'd like to see you make a Beam Plugin go for it, you got 1 day. Starting NOW
__________________

Dutchie is offline
blackops7799
Senior Member
Join Date: May 2006
Old 01-25-2007 , 21:19   Re: Beam Help.
Reply With Quote #12

First off... I did not take any karma from you.

Last edited by blackops7799; 01-26-2007 at 16:10.
blackops7799 is offline
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 21:26   Re: Beam Help.
Reply With Quote #13

k, paste the code.
__________________

Dutchie is offline
blackops7799
Senior Member
Join Date: May 2006
Old 01-25-2007 , 22:29   Re: Beam Help.
Reply With Quote #14

EDIT Code removed


I know its not my code, he just wanted something that works.

Last edited by blackops7799; 01-26-2007 at 01:26.
blackops7799 is offline
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-25-2007 , 23:13   Re: Beam Help.
Reply With Quote #15

Good job, you prooved me wrong. +Karma
__________________

Dutchie is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 01-26-2007 , 00:08   Re: Beam Help.
Reply With Quote #16

Quote:
Originally Posted by blackops7799 View Post
I know it may not be the best code... but it works.

(first time using messages)

I wasn't sure what you wanted, so I made the beam go where you are aiming.
It's a little jumpy in-game.

Code:
#include <amxmodx> #include <amxmisc> new beamsprite new rope_to[33][3] new Float:rope_totaldis[33] new beamon[33] public plugin_init() {     register_plugin("Beam Me", "1.1" , "blackops7799")     register_clcmd("say /beamme","beam") } public plugin_precache() {     beamsprite = precache_model("sprites/dot.spr") } public beam(id) {     if(beamon[id] == 1)     {         return PLUGIN_HANDLED     }     else     {         static origin1[3]         get_user_origin(id,origin1)             static Float:origin1_F[3]         origin1_F[0] = float(origin1[0])         origin1_F[1] = float(origin1[1])         origin1_F[2] = float(origin1[2])         static origin2[3]         get_user_origin(id,origin2,3)         rope_to[id][0]=origin2[0]         rope_to[id][1]=origin2[1]         rope_to[id][2]=origin2[2]         static Float:origin2_F[3]         origin2_F[0] = float(origin2[0])         origin2_F[1] = float(origin2[1])         origin2_F[2] = float(origin2[2])         static Float:distance[3]         distance[0] = floatabs(origin1_F[0] - origin2_F[0])         distance[1] = floatabs(origin1_F[1] - origin2_F[1])         distance[2] = floatabs(origin1_F[2] - origin2_F[2])         rope_totaldis[id] = floatsqroot(distance[0]*distance[0] + distance[1]*distance[1] + distance[2]*distance[2])         //Create green beam         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)         write_byte(1)       //TE_BEAMENTPOINT         write_short(id)     // start entity         write_coord(rope_to[id][0])         write_coord(rope_to[id][1])         write_coord(rope_to[id][2])         write_short(beamsprite)         write_byte(1)       // framestart         write_byte(1)       // framerate         write_byte(01)      // life in 0.1's         write_byte(5)       // width         write_byte(0)       // noise         write_byte(255)     // red         write_byte(0)       // green         write_byte(0)       // blue         write_byte(1000)        // brightness         write_byte(0)       // speed         message_end()         set_task(0.01,"testbeam",id)         set_task(5.0,"stopbeam",id)         set_task(5.1,"resetbeam",id)         return PLUGIN_HANDLED     }     return PLUGIN_HANDLED } public stopbeam(id) {     beamon[id] = 1     return PLUGIN_HANDLED } public resetbeam(id) {     beamon[id] = 0     return PLUGIN_HANDLED }
Are you sure that's your code?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
LittleDude
Member
Join Date: Dec 2004
Location: Selah, WA
Old 01-26-2007 , 00:14   Re: Beam Help.
Reply With Quote #17

i dont think so... why do you have a variable named rope_to in a beam plugin? makes no sense...
__________________
It is stupid to be stupid, and stupid to not be stupid
LittleDude is offline
Send a message via AIM to LittleDude
Dutchie
Junior Member
Join Date: Jan 2007
Location: Canada!!!
Old 01-26-2007 , 07:15   Re: Beam Help.
Reply With Quote #18

Yeah, wouldn't it be beam_to?
__________________

Dutchie is offline
blackops7799
Senior Member
Join Date: May 2006
Old 01-26-2007 , 08:56   Re: Beam Help.
Reply With Quote #19

It really doesn't matter what it's called. I could call it DERKADERKA and it would still work...
blackops7799 is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-26-2007 , 08:57   Re: Beam Help.
Reply With Quote #20

why do you need the beam ?
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat 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 12:00.


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