AlliedModders

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

stigma 10-28-2006 19:47

Laserbeam follow..
 
1 Attachment(s)
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)

stigma 10-28-2006 19:54

Re: Laserbeam follow..
 
Dont mind the "bool" in the top..


All times are GMT -4. The time now is 04:51.

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