Raised This Month: $ Target: $400
 0% 

loading problem!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
BigMac
Member
Join Date: Jul 2009
Old 09-29-2009 , 17:30   loading problem!
Reply With Quote #1

Imma make this quick and easy the entity loads but the color does not load
it saves it but doesnt load it correct see any problems?



PHP Code:
LoadBlocks(id)
{
    if ( 
id != && !g_admin[id] )
    {
        
console_print(id"You have no access to that command");
        return 
PLUGIN_HANDLED;
    }
    else if ( !
file_exists(g_file)
    && 
<= id <= g_max_players )
    {
        
BCM_Print(id"Couldn't find file:^1 %s"g_file);
        return 
PLUGIN_HANDLED;
    }
    
    if ( 
<= id <= g_max_players )
    {
        
DeleteAll(idfalse);
    }
    
    new 
file;
    new 
data[128];
    new 
light_count;
    new 
type[2];
    new 
origin_x[17];
    new 
origin_y[17];
    new 
origin_z[17];
    new 
property1[5], property2[5], property3[5], property4[5];
    new 
Float:origin[3];
    
    
file fopen(g_file"rt");
    
    while ( !
feof(file) )
    {
        
type g_blank;
        
        
fgets(filedatacharsmax(data));
        
parse(data,\
            
typecharsmax(type),\
            
origin_xcharsmax(origin_x),\
            
origin_ycharsmax(origin_y),\
            
origin_zcharsmax(origin_z),\
            
property1charsmax(property1),\
            
property2charsmax(property2),\
            
property3charsmax(property3),\
            
property4charsmax(property4)
            );
        
        
origin[0] =    str_to_float(origin_x);
        
origin[1] =    str_to_float(origin_y);
        
origin[2] =    str_to_float(origin_z);
        
        if ( 
strlen(type) > )
        {    
            switch ( 
type[0] )
            {
                case 
'!':
                {
                    
CreateLight(originproperty1property2property3property4);
                    
                    ++
light_count;
                }
            }
            
            if ( 
type[0] != '!' )
            {
                
CreateLight(originproperty1property2property3property4);
                
            }
        }
    }
    
    
fclose(file);
    
    if ( 
<= id <= g_max_players )
    {
        static 
name[32];
        
get_user_name(idnamecharsmax(name));
        
        for ( new 
1<= g_max_players; ++)
        {
            if ( !
g_connected[i]
            || !
g_admin[i] ) continue;
            
            
BCM_Print(i"^1%s^3 loaded^1 %d light%s^3! Total entites in map:^1 %d"namelight_countlight_count == g_blank "s"entity_count());
        }
    }
    
    return 
PLUGIN_HANDLED;

__________________
BigMac is offline
 


Thread Tools
Display Modes

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 22:40.


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