AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Beam Help. (https://forums.alliedmods.net/showthread.php?t=50389)

Dutchie 01-25-2007 08:19

Beam Help.
 
Would anyone be kind enough to make me the code so when a user says /beam a laser beam shoots out for 5 seconds. I'll do the rest, thank you.

dutchmeat 01-25-2007 09:04

Re: Beam Help.
 
Dutch will help Dutchie,

Code:
message_begin( MSG_BROADCAST, SVC_TEMPENTITY) write_byte(0) // TE_BEAMPOINTS write_coord(startloc[0]) write_coord(startloc[1]) write_coord(startloc[2]) // start location write_coord(endloc[0]) write_coord(endloc[1]) write_coord(endloc[2]) // end location write_short(spritename) // spritename write_byte(startframe) // start frame write_byte(framerate) // framerate write_byte(life) // life write_byte(width) // line width write_byte(amplitude) // amplitude write_byte(255) write_byte(255) write_byte(255) // color write_byte(brightness) // brightness write_byte(speed) // speed message_end()
Change 'life' to 5 or more seconds.

Dutchie 01-25-2007 09:06

Re: Beam Help.
 
Ah I tried and it says my /beamme won't do anything.. Hmm

dutchmeat 01-25-2007 09:07

Re: Beam Help.
 
show me the full code.

Dutchie 01-25-2007 09:11

Re: Beam Help.
 
Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Beamme"
#define VERSION "1.0"
#define AUTHOR "Dutchie"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
   
register_cmd(say("/beamme" "Beamme" "chatsay"   
    message_begin( MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(0) // TE_BEAMPOINTS
write_coord(startloc[0])
write_coord(startloc[1])
write_coord(startloc[2]) // start location
write_coord(endloc[0])
write_coord(endloc[1])
write_coord(endloc[2]) // end location
write_short(spritename) // spritename
write_byte(startframe) // start frame
write_byte(framerate) // framerate
write_byte(life) // life
write_byte(width) // line width
write_byte(amplitude) // amplitude
write_byte(255)
write_byte(255)
write_byte(255) // color
write_byte(brightness) // brightness
write_byte(speed) // speed
message_end ()
}

Yeah, I'm, farly new to coding, don't ask I know it's sloppy.

dutchmeat 01-25-2007 09:18

Re: Beam Help.
 
haha, i can see that...
pff, first learn how to make a basic plugin, and then learn how to precache a sprite...
If you are able to create your own function, post again, because you have alot to learn

Dutchie 01-25-2007 09:19

Re: Beam Help.
 
Yeah I'm going to go re-read all of that PAWN language. :wink:

dutchmeat 01-25-2007 10:33

Re: Beam Help.
 
Yes, and also take a look at the Amxx 'how-to-make-a-plugin' tutorial, wherever that may be.

Dutchie 01-25-2007 16:37

Re: Beam Help.
 
Sure will. =)

blackops7799 01-25-2007 20:42

Re: Beam Help.
 
EDIT: n.m..


All times are GMT -4. The time now is 22:29.

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