Raised This Month: $32 Target: $400
 8% 

Entity don't spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rivotril
Senior Member
Join Date: Feb 2014
Location: Argentina
Old 03-25-2016 , 00:26   Entity don't spawn
Reply With Quote #1

Hi, i'm having some problems with this, i'm using Slenderman

https://forums.alliedmods.net/showthread.php?t=216635

and sometimes the entity of the page don't spawn (Sometimes spawn all, sometimes fail and don't spawn one and f#$! the round)

any idea?

PHP Code:
public origin_2_file_handler(idmenuitem)
{
    static 
filename[256]
    
get_configsdir(filename,charsmax(filename))
    
    static 
map[32]
    
get_mapname(mapcharsmax(map))
    
    
formatex(filenamecharsmax(filename), "%s\slenderman\maps\%s.cfg",filename,map)
    
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    new 
key str_to_num(data);
    switch(
key)
    {
        case 
1:
        {    
            new 
iOrigin[3]
            
get_user_origin(idiOrigin0)
            
            new 
origincontent[256]
            
formatex(origincontentcharsmax(origincontent), "%d %d %d"iOrigin[0],iOrigin[1],iOrigin[2])
            
            
write_file(filenameorigincontent)
        }
        case 
2:
        {
            new 
lines file_size(filename1);
            for (new 
line=0line <=linesline++)
            {
                static 
iOrigin[3][8]
                static 
Float:origin[3]
                static 
lineBuffer[256], len;
                
read_file(filenamelinelineBuffercharsmax(lineBuffer), len);
                
                
parse(lineBuffer,iOrigin[0],7,iOrigin[1],7,iOrigin[2],7)
                
                
origin[0] = str_to_float(iOrigin[0])
                
origin[1] = str_to_float(iOrigin[1])
                
origin[2] = str_to_float(iOrigin[2])
                
                new 
ent create_entity("env_sprite")
                
                
entity_set_string(entEV_SZ_classname"editorpage")
                
entity_set_model(entg_szEditorSprite)
                
entity_set_int(entEV_INT_spawnflagsSF_SPRITE_STARTON)
                
entity_set_float(entEV_FL_framerate30.0)
                
                
DispatchSpawn(ent)
                
                
entity_set_origin(entorigin)
                
entity_set_size(entFloat:{-25.0, -25.0, -25.0}, Float:{25.025.025.0})
                
entity_set_int(entEV_INT_solidSOLID_TRIGGER)
                
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY)
                
entity_set_int(entEV_INT_rendermodekRenderTransAdd)
                
entity_set_float(entEV_FL_renderamt255.0)
                
entity_set_float(entEV_FL_scale1.0)
                
entity_set_float(entEV_FL_gravity,0.0
                
            }
            
g_bAllPagesShow true
        
}
        case 
3:
        {
            
DeleteAllEditorSprites()
            
        }    
    }

Rivotril 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 20:18.


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