Raised This Month: $ Target: $400
 0% 

[req] Colored block (bm)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 04-05-2010 , 03:07   Re: [req] Colored block (bm)
Reply With Quote #1

Alright, so here's my dirty way of doing it:
  • Globally declare
    PHP Code:
    new rnum[33
  • When the BM checks if( isBlock( ent ) ) in client_PreThink, add in
    PHP Code:
    if( isBlockent ) )
    {
        if( 
    blockType != BM_WHATEVERYOUNAMEDIT // common sense required
        
    {
            
    rnum[id] = randomsizeof BLOCK_COLORS )
        }

        
    // stuff for blocks...

    inside of the code block.
  • Replace the function I previously gave you with:
    PHP Code:
    actionColoredBlock(id)
    {
        new 
    origin[3];
        
    get_user_origin(idorigin);
                                
        
    message_begin(MSG_BROADCAST,SVC_TEMPENTITY,origin);
              
    write_byte(TE_DLIGHT);
              
    write_coord(origin[0]);
              
    write_coord(origin[1]); 
              
    write_coord(origin[2]);  
              
    write_byte(50);
              
    write_byte(BLOCK_COLORS[rnum[id]][0]);
              
    write_byte(BLOCK_COLORS[rnum[id]][1]);
              
    write_byte(BLOCK_COLORS[rnum[id]][2]);
              
    write_byte(255);
              
    write_byte(50); 
        
    message_end();


Keep in mind that this probably isn't the most efficient way to do it, since it's in preThink, but I couldn't think of any other way to do it.

Let me know if it works.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT

Last edited by wrecked_; 04-05-2010 at 03:14.
wrecked_ 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 00:55.


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