Raised This Month: $ Target: $400
 0% 

Code, that does tray after player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
danonix
Senior Member
Join Date: Dec 2012
Old 05-08-2013 , 01:33   Code, that does tray after player
Reply With Quote #1

Hello,

Could someone help me with cut function from there http://forums.alliedmods.net/showthread.php?t=19328, or make new one which does trail after player - need it in green, yellow, blue, violet, orange, white and black. I can't get, which code does it. I need it, because I want to do trail after player in other plugin.

I don't want whole plugin, because it would be too long. I just need function, that respond for writing for example black tray after player.

Thanks very much.

Cheers

Last edited by danonix; 05-08-2013 at 01:35.
danonix is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-08-2013 , 01:48   Re: Code, that does tray after player
Reply With Quote #2

Here you go.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-08-2013 , 10:01   Re: Code, that does tray after player
Reply With Quote #3

PHP Code:
public Util_TE_BEAMFOLLOW(identityspritelifewidthredgreenbluebrightness

    
message_begin(id MSG_ONE MSG_ALLSVC_TEMPENTITY_id); 
    
write_byte(TE_BEAMFOLLOW); 
    
write_short(entity); 
    
write_short(sprite); 
    
write_byte(life); // life in 0.1's 
    
write_byte(width); // line width in 0.1's 
    
write_byte(red); 
    
write_byte(green); 
    
write_byte(blue); 
    
write_byte(brightness); 
    
message_end(); 

__________________
Kia is offline
danonix
Senior Member
Join Date: Dec 2012
Old 05-08-2013 , 11:42   Re: Code, that does tray after player
Reply With Quote #4

Thank you very much Kia! Got only one question, what should I enter for sprite? Because I have got no idea. Tried to enter sprite, tried to define new things, got argument mismatch.

Thanks!

Last edited by danonix; 05-08-2013 at 11:48.
danonix is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-08-2013 , 11:51   Re: Code, that does tray after player
Reply With Quote #5

PHP Code:
new const szSprite[] = "sprites/wasabi.spr" 
.
.
.
PHP Code:
precache_model(szSprite
.
.
.
PHP Code:
write_short(szSprite
__________________
Kia is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-08-2013 , 12:03   Re: Code, that does tray after player
Reply With Quote #6

Quote:
Originally Posted by Kia View Post
PHP Code:
new const szSprite[] = "sprites/wasabi.spr" 
.
.
.
PHP Code:
precache_model(szSprite
.
.
.
PHP Code:
write_short(szSprite
Um, you are aware that szSprite is a string, not short right?

Not sure but I think it needs the sprite index instead.

Code:
new const szSprite[ ] = "sprites/wasabi.spr" new iSprIndex public plugin_precache( ) {     iSprIndex = precache_model( szSprite ) } write_short( iSprIndex )
Backstabnoob is offline
danonix
Senior Member
Join Date: Dec 2012
Old 05-08-2013 , 12:02   Re: Code, that does tray after player
Reply With Quote #7

Could you tell me what im doing wrong? Thanks you very much for your help, I have just got no idea what's wrong
Code:
new sprite
new const szSprite[] = "sprites/laserbeam.spr" 
....
precache_model(szSprite)
....
Util_TE_BEAMFOLLOW(player, id, sprite, 20, 5, 0, 255, 0, 100)
....
public Util_TE_BEAMFOLLOW(id, entity, sprite, life, width, red, green, blue, brightness) 
{ 
    message_begin(id ? MSG_ONE : MSG_ALL, SVC_TEMPENTITY, _, id); 
    write_byte(TE_BEAMFOLLOW); 
    write_short(entity); 
    write_short(szSprite); 
    write_byte(life);
    write_byte(width);
    write_byte(red); 
    write_byte(green); 
    write_byte(blue); 
    write_byte(brightness); 
    message_end(); 
}
danonix is offline
danonix
Senior Member
Join Date: Dec 2012
Old 05-08-2013 , 12:30   Re: Code, that does tray after player
Reply With Quote #8

Ok, there are no errors now in compilation, thanks, will tell if it works!

Thanks one more time
danonix is offline
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 05-08-2013 , 12:39   AW: Code, that does tray after player
Reply With Quote #9

Don't forget that the trail will only last as long as you specify in the parameter, to continue it you need to make a task.
__________________
Kia is offline
danonix
Senior Member
Join Date: Dec 2012
Old 05-08-2013 , 12:51   Re: Code, that does tray after player
Reply With Quote #10

Everything works perfectly, you are great guys!

Thank you very much, have a nice day!
danonix 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 10:50.


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