AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Code Snippets/Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=83)
-   -   Half-Life CD Player. (https://forums.alliedmods.net/showthread.php?t=324793)

DJEarthQuake 05-27-2020 12:13

Half-Life CD Player.
 
1 Attachment(s)
This snip loops tracks from Valve's media directory.

Code:
emessage_begin(MSG_ONE,SVC_CDTRACK,{0,0,0},id);ewrite_byte(iTrack);ewrite_byte(Loop);emessage_end();

OciXCrom 05-27-2020 14:19

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Change MSG_BROADCAST to a 0
Again with your nonsense?

What is even the point of this thread? You have [small] tags in the .sma file?

If you're so worried about pico-optimizations, why did you create two variables when you don't need them?
"else return" is not needed either since the function ends anyways after the "if".

Quote:

All else is unstable.
I'm seriously starting to think that you're some kind of advanced spam bot.

DJEarthQuake 05-28-2020 11:16

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Thanks for the critique. Try using MSG_ONE. It's unstable. One thing we missed. Random was starting from 0 instead of 1.

Quote:

Originally Posted by OciXCrom (Post 2702623)
Again with your nonsense?

What is even the point of this thread? You have [small] tags in the .sma file?

If you're so worried about pico-optimizations, why did you create two variables when you don't need them?
"else return" is not needed either since the function ends anyways after the "if".



I'm seriously starting to think that you're some kind of advanced spam bot.


OciXCrom 05-28-2020 13:57

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Originally Posted by DJEarthQuake (Post 2702801)
Thanks for the critique. Try using MSG_ONE. It's unstable. One thing we missed. Random was starting from 0 instead of 1.

Who mentioned anything about MSG_ONE? Your code uses MSG_BROADCAST which is 0 and you're suggesting us to change it to 0.
Why even post something and tell people to change it rather than doing the changes in the post itself?
What is the point of changing 0 to 0?!

None of your comments in this forum make any sense to me.

DJEarthQuake 05-28-2020 21:05

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Stable msg_one example posted. Hope you have a better day.

thEsp 05-29-2020 05:45

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Originally Posted by DJEarthQuake (Post 2702892)
Stable msg_one example posted. Hope you have a better day.

Excellent replying choice of a wise man.

:)

HamletEagle 05-29-2020 07:05

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Originally Posted by DJEarthQuake (Post 2702892)
Stable msg_one example posted. Hope you have a better day.

I can't find any MSG_ONE reference in your post or sma file.
I'm totally confused.

DJEarthQuake 05-29-2020 11:03

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Read the post again please. It's there.
Quote:

emessage_begin(MSG_ONE,SVC_CDTRACK,{0,0,0},id )

OciXCrom 05-29-2020 15:02

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Originally Posted by HamletEagle (Post 2702944)
I can't find any MSG_ONE reference in your post or sma file.
I'm totally confused.

The post suffered many edits between each of his comments. The original post was even more confusing.

DJEarthQuake 05-29-2020 15:57

Re: Half-Life CD Player. Plays mp3's from ../valve/media directory.
 
Quote:

Originally Posted by OciXCrom (Post 2702825)
Who mentioned anything about MSG_ONE? Your code uses MSG_BROADCAST which is 0 and you're suggesting us to change it to 0.
Why even post something and tell people to change it rather than doing the changes in the post itself?
What is the point of changing 0 to 0?!

None of your comments in this forum make any sense to me.

First of all I have never pushed hard-coding.
Second the intent of the comment was to warn about crashing when changing Destination types for message_begin. Post has been 'updated'.

Third, people do update their posts.
Quote:

Originally Posted by OciXCrom (Post 2703014)
The post suffered many edits between each of his comments. The original post was even more confusing.

You told me to do that then act like I have no right to or frown upon it. You can't have it both ways.
Quote:

"Why even post something and tell people to change it rather than doing the changes in the post itself?"


All times are GMT -4. The time now is 23:09.

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