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

beam/sprite not showing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-18-2018 , 16:02   beam/sprite not showing
Reply With Quote #1

hi guys. im trying to create beam with an simple sprite. code is executed ingame but nothing is created...here is the code of it:

PHP Code:
new origin[3];
    
get_user_origin(idorigin3);
         
    
message_beginMSG_ALLSVC_TEMPENTITY, { 0.00.00.0 }, id );
    
write_byteTE_BEAMPOINTS );
    
write_coordorigin[0] ); //start-x
    
write_coordorigin[1] );// y
    
write_coordorigin[2] );// z
    
write_coordorigin[0]+100 );// end - x
    
write_coordorigin[1] ); //y 
    
write_coordorigin[2] ); //z
    
write_shortsprite )    // sprite index
    
write_byte(0)        // starting frame
    
write_byte(1)        // frame rate
    
write_byte(5)        // life
    
write_byte(10)        // line width
    
write_byte(0)        // noise
    
write_byte(255);        // red
    
write_byte(200);        // green
    
write_byte(0);        // blue
    
write_byte(200)
    
write_byte(0);    
    
message_end() 
is the problem with coordinates ? thanks in advance

Last edited by JocAnis; 07-18-2018 at 16:03.
JocAnis is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-18-2018 , 16:12   Re: beam/sprite not showing
Reply With Quote #2

PHP Code:
message_beginMSG_ALLSVC_TEMPENTITY, { 0.00.00.0 }, id ); 
=>
PHP Code:
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_id); 
__________________
My plugin:
Celena Luna is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 07-18-2018 , 16:17   Re: beam/sprite not showing
Reply With Quote #3

thanks, now it is showing something...isnt get_user_origin getting player's origins not the coords where he aims ? cuz sprite is created on my crosshair pointing
JocAnis is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 16:26   Re: beam/sprite not showing
Reply With Quote #4

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
message_beginMSG_ALLSVC_TEMPENTITY, { 0.00.00.0 }, id ); 
=>
PHP Code:
message_begin(MSG_ONE_UNRELIABLESVC_TEMPENTITY_id); 
Also remove id cause its MSG_ALL
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-18-2018 , 16:27   Re: beam/sprite not showing
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
thanks, now it is showing something...isnt get_user_origin getting player's origins not the coords where he aims ? cuz sprite is created on my crosshair pointing
get_user_origin's third parameter is which type of origin you want, 3rd is aiming, zero is just players origin
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted 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 15:48.


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