Raised This Month: $51 Target: $400
 12% 

[SLOVED] How to Hook .spr to origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-02-2014 , 12:13   [SLOVED] How to Hook .spr to origin
Reply With Quote #1

I want some help about how i can hook .spr file ex (beam.spr) to some float origin ex (-2786 3299 912)

i want when function is ON then .spr make hook to tht place (-2786 3299 912) if function OFF .spr hidden !

sr , my bad eng !
__________________
SPACE TIME

Last edited by Kuma77; 10-31-2014 at 20:42. Reason: I'am Not Here
Kuma77 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-02-2014 , 13:32   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #2

engfunc( EngFunc_WriteCoord, float ) ?
__________________
HamletEagle is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-02-2014 , 14:34   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
engfunc( EngFunc_WriteCoord, float ) ?
idk ! , but what should i put after this code

PHP Code:
new g_hocked

engfunc
(EngFunc_MessageBegin,MSG_ALL,g_hocked,{0.00.00.0},0)
    
write_byte(1)
    
write_string(beam.spr)
    
write_byte(0)
        
message_end() 
plz correct
__________________
SPACE TIME

Last edited by Kuma77; 10-02-2014 at 14:36.
Kuma77 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 10-03-2014 , 12:01   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #4

Please, explain what message do you want to send. You can look into messages_const.inc and see. Do you want to create an explosion/ a beam or what ?
__________________
HamletEagle is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-03-2014 , 21:34   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #5

I am working on Capture The Flag for HL 1 , i want to add arrow spr when player has flag the arrow sprite shows you the way for your base ( arrow spr hooked automaticly to player base )

then when player capture or lose flag the arrow spr hidden

i hope you understand me ! .
__________________
SPACE TIME

Last edited by Kuma77; 10-03-2014 at 21:35.
Kuma77 is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 10-04-2014 , 13:06   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #6

Quote:
Originally Posted by Kuma77 View Post
I am working on Capture The Flag for HL 1 , i want to add arrow spr when player has flag the arrow sprite shows you the way for your base ( arrow spr hooked automaticly to player base )

then when player capture or lose flag the arrow spr hidden

i hope you understand me ! .
I partly understand you
do you want an arrow like this


that shows the general direction

or one like this




The second one is very easy if you have the player's origin and the base origin

PHP Code:
message_beginMSG_BROADCASTSVC_TEMPENTITY );
        
write_byteTE_BEAMPOINTS );
        
engfuncEngFunc_WriteCoordv_Origin] ); //origins for start of beam(your case player)
        
engfuncEngFunc_WriteCoordv_Origin] );//origins for start of beam(your case player)
        
engfuncEngFunc_WriteCoordv_Origin] );//origins for start of beam(your case player)
        
engfuncEngFunc_WriteCoordv_Origin] + 300.0);//origins for end of beam(your case base)
        
engfuncEngFunc_WriteCoordv_Origin] );//origins for end of beam(your case base)
        
engfuncEngFunc_WriteCoordv_Origin] + 3000.0 );//origins for end of beam(your case base)
        
write_shortbeam ); //beam model
        
write_byte);
        
write_byte);
        
write_byte200 ); //life
        
write_byte100 ); //width
        
write_byte50 ); //spread
        
write_byte216 ); //red
        
write_byte); //green
        
write_byte); //blue
        
write_byte255 );
        
write_byte255 );
        
message_end( );

beam precache_model"sprites/laserbeam.spr" ); 
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.

Last edited by aron9forever; 10-04-2014 at 13:08.
aron9forever is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-04-2014 , 14:25   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #7

Thx aron9forever , yes i like second one .

Now i have an idea to do it , your code helpfull
__________________
SPACE TIME

Last edited by Kuma77; 10-04-2014 at 14:27.
Kuma77 is offline
Kuma77
Senior Member
Join Date: Sep 2014
Location: Behind PC
Old 10-04-2014 , 14:31   Re: [HELP] How to Hook .spr to float origin
Reply With Quote #8

Quote:
Originally Posted by aron9forever View Post

The second one is very easy if you have the player's origin and the base origin
i have base origin but i have just spawn players origin , i'll try with this code

( sorry for double post )
__________________
SPACE TIME

Last edited by Kuma77; 10-04-2014 at 14:32.
Kuma77 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 21:14.


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