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

Timed Blind block


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
t*stylez
BANNED
Join Date: Apr 2010
Old 04-30-2010 , 17:31   Timed Blind block
Reply With Quote #1

i have below, a action code for a Blind block on my blockmaker
PHP Code:
actionBlind(id){
    if(
is_user_alive(id)){
        
gMsgScreenFade get_user_msgid("ScreenFade");
        
Flash(id);
    }

how can i make it so if you are on it. the blind will only last for 6 seconds. and you'll get your vision back.

for example:
current way : as long as you're on it / touching the top. you are blind.
what i want : if you're on it / touching top, you'll only be blind for 6 seconds

Thanks.
t*stylez is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 04-30-2010 , 17:51   Re: Timed Blind block
Reply With Quote #2

you need to change Flash(id) i guess
paste that function over yonder
__________________
minimiller is offline
Send a message via MSN to minimiller
t*stylez
BANNED
Join Date: Apr 2010
Old 04-30-2010 , 17:59   Re: Timed Blind block
Reply With Quote #3

you don't need it but, here it is anyways

PHP Code:
public Flash(id){
    
message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id);
    
write_short1<<15 );
    
write_short1<<10 );
    
write_short1<<12 );
    
write_byte255 );
    
write_byte);
    
write_byte);
    
write_byte255 );
    
message_end();

t*stylez is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 04-30-2010 , 18:20   Re: Timed Blind block
Reply With Quote #4

try
PHP Code:
public Flash(id){
    
message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id);
    
write_short(600); //600 = 6 seconds (i think)
    
write_short(600); //600 = 6 seconds (i think)
    
write_short(1<<12);
    
write_byte(255);
    
write_byte(0);
    
write_byte(0);
    
write_byte(255);
    
message_end();

__________________
minimiller is offline
Send a message via MSN to minimiller
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-30-2010 , 18:34   Re: Timed Blind block
Reply With Quote #5

Quote:
Originally Posted by minimiller View Post
try
PHP Code:
    write_short(600); //600 = 6 seconds (i think) 
lol, no it isn't.

PHP Code:
#define seconds_to_screenfade_units(%1) (clamp((%1 * (1<<12)), 0, 0xFFFF))

public Flash(id){
    
message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id);
    
write_short(seconds_to_screenfade_units(6));
    
write_short(seconds_to_screenfade_units(6));
    
write_short(1<<12);
    
write_byte(255);
    
write_byte(0);
    
write_byte(0);
    
write_byte(255);
    
message_end();

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
t*stylez
BANNED
Join Date: Apr 2010
Old 06-07-2010 , 11:02   Re: Timed Blind block
Reply With Quote #6

Exolent, it doesn't work,
when i get off the blind lasts for 6 seconds.
i want it so if you stand on the block for at least 6 seconds you can see again.
t*stylez is offline
Old 06-07-2010, 13:36
unnyquee
This message has been deleted by unnyquee. Reason: ...nevermind
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 00:16.


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