AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that (https://forums.alliedmods.net/showthread.php?t=85628)

Speed! 02-13-2009 21:11

How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
...

Brad 02-13-2009 23:05

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
Best clarify what you're asking before I come back to this thread tomorrow morning or it's getting trashed and you're getting a severe talking to.

Speed! 02-13-2009 23:43

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
Quote:

Originally Posted by Brad (Post 761229)
Best clarify what you're asking before I come back to this thread tomorrow morning or it's getting trashed and you're getting a severe talking to.

i mean, when you use write_short¡, you use them like this when you wanna write time: write_short(UNIT_SECOND*1)
how should i do for milliseconds?

danielkza 02-14-2009 00:03

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
Quote:

Originally Posted by Speed! (Post 761246)
i mean, when you use write_short¡, you use them like this when you wanna write time: write_short(UNIT_SECOND*1)
how should i do for milliseconds?

If the message descriptions says seconds then 1 = 1s. There is no such thing as multiple units. If the message asks for milliseconds, then add 1000 for each second (mili=1000, milisecond=1s/1000), if it asks for seconds then you can't use split seconds at all.

Speed! 02-14-2009 00:27

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
i remember seeing at instead of UNIT_SECOND*x using something' like 340<<4666 :S

danielkza 02-14-2009 00:45

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
Quote:

Originally Posted by Speed! (Post 761256)
i remember seeing at instead of UNIT_SECOND*x using something' like 340<<4666 :S

I think ScreenFade has special format for the time, but I'm also pretty sure there is a note on it's description here, as all arguments for all the other messages too.

Speed! 02-14-2009 10:06

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
Ok I go to the point. How to make a screen tint that lasts 0.2 secs?

Starsailor 02-14-2009 10:18

Re: How should be, instead of UNIT_SECOND, UNIT_MILISECOND or somethin' like that
 
PHP Code:

message_begin(MSG_ONE_UNRELIABLEget_user_msgid("ScreenFade"), _,id)
    
write_short((1<<12)) 
    
write_short(floatround((1<<12)*0.2)
    
write_short(0x0000
    
write_byte(0// r
    
write_byte(200// g
    
write_byte(0// b
    
write_byte(60// alpha
    
message_end() 



All times are GMT -4. The time now is 17:06.

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