Raised This Month: $ Target: $400
 0% 

Laserbeam follow..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 10-28-2006 , 19:47   Laserbeam follow..
Reply With Quote #1

I assume that all of you know spiderman in the SuperHero mod...

So if i have this:

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fun> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" new laser new bool:LaserL = false public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("+hook","do_laser") // Someone who know how to do this?     register_clcmd("-hook","stop_laser") // -----''----- } public plugin_precache() {     laser = precache_model("sprites/laserbeam.spr") } public client_PreThink(id) {     new aID, aBody     get_user_aiming(id,aID,aBody)         if (aID != 0.0) {         do_laser(id, aID)     }     return PLUGIN_CONTINUE }     public do_laser(id, aID) {         new orig[3], aorig[3]     get_user_origin(id,orig,1)     get_user_origin(aID,aorig,1)         message_begin(MSG_BROADCAST,SVC_TEMPENTITY)     write_byte (TE_BEAMPOINTS)     write_coord(orig[0])     write_coord(orig[1])     write_coord(orig[2])     write_coord(aorig[0])     write_coord(aorig[1])     write_coord(aorig[2])     write_short(laser);     write_byte(1) // framestart     write_byte(1) // framerate     write_byte(50) // life     write_byte(10) // width     write_byte(0) // noise     write_byte(100) // r, g, b (red)     write_byte(100) // r, g, b (green)     write_byte(255) // r, g, b (blue)     write_byte(127) // brightness     write_byte(1) // speed     message_end()     }   public stop_laser(id) {     // Someone who know a function to stop the function above from showing the laserbeam? }

Then i want it to be like in the superhero mod, just without it pulls you to the target that your aiming at, just so the beam follow's you.
See the attatched illustation. (The red line is the laserbeam)
Attached Thumbnails
Click image for larger version

Name:	laserbeam_illu.JPG
Views:	256
Size:	87.2 KB
ID:	11596  

Last edited by stigma; 10-28-2006 at 19:53.
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
stigma
Senior Member
Join Date: Mar 2005
Location: Denmark
Old 10-28-2006 , 19:54   Re: Laserbeam follow..
Reply With Quote #2

Dont mind the "bool" in the top..
stigma is offline
Send a message via MSN to stigma Send a message via Skype™ to stigma
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 04:50.


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