Right, forgot to post the LoadEntrance code.
pawn Код:
// ================================== [ DYNAMIC ENTRANCES ] =============================================
public LoadEntrance( entranceid )
{
new
nameStr [ 128 ];
INI_ParseFile( FindEntranceFile( entranceid ), "LoadEntrance_%s", .bExtra = true, .extra = entranceid );
if( eSpawned [ entranceid ] == false )
{
ePickup [ entranceid ] = CreateDynamicPickup( EntranceInfo [ entranceid ] [ Icon ], 1, EntranceInfo [ entranceid ] [ eX ], EntranceInfo [ entranceid ] [ eY ], EntranceInfo [ entranceid ] [ eZ ], EntranceInfo [ entranceid ] [ VirtualWorld ], EntranceInfo [ entranceid ] [ Interior ], -1, 100.0 );
format( nameStr, 128, "%s", EntranceInfo [ entranceid ] [ Name ] );
eLabel [ entranceid ] = Create3DTextLabel( nameStr, EntranceInfo [ entranceid ] [ Colour ], EntranceInfo [ entranceid ] [ eX ], EntranceInfo [ entranceid ] [ eY ], EntranceInfo [ entranceid ] [ eZ ], 10.0, EntranceInfo [ entranceid ] [ VirtualWorld ], 0 );
eSpawned [ entranceid ] = true;
}
else
{
DestroyDynamicPickup( ePickup [ entranceid ] );
Delete3DTextLabel( eLabel [ entranceid ] );
eSpawned [ entranceid ] = false;
ePickup [ entranceid ] = CreateDynamicPickup( EntranceInfo [ entranceid ] [ Icon ], 1, EntranceInfo [ entranceid ] [ eX ], EntranceInfo [ entranceid ] [ eY ], EntranceInfo [ entranceid ] [ eZ ], EntranceInfo [ entranceid ] [ VirtualWorld ], EntranceInfo [ entranceid ] [ Interior ], -1, 100.0 );
format( nameStr, 128, "%s", EntranceInfo [ entranceid ] [ Name ] );
eLabel [ entranceid ] = Create3DTextLabel( nameStr, EntranceInfo [ entranceid ] [ Colour ], EntranceInfo [ entranceid ] [ eX ], EntranceInfo [ entranceid ] [ eY ], EntranceInfo [ entranceid ] [ eZ ], 10.0, EntranceInfo [ entranceid ] [ VirtualWorld ], 0 );
eSpawned [ entranceid ] = true;
}
return true;
}
public SaveEntrance( entranceid )
{
if( !fexist( FindEntranceFile( entranceid ) ) ) return false;
new
INI: eFile = INI_Open( FindEntranceFile( entranceid ) );
INI_SetTag( eFile, "data" );
INI_WriteString( eFile, "E_NAME", EntranceInfo [ entranceid ] [ Name ] );
INI_WriteInt( eFile, "E_ICON", EntranceInfo [ entranceid ] [ Icon ] );
INI_WriteInt( eFile, "E_OPEN", EntranceInfo [ entranceid ] [ Open ] );
INI_WriteString( eFile, "E_COLOUR", EntranceInfo [ entranceid ] [ Colour ] );
INI_WriteFloat( eFile, "E_X", EntranceInfo [ entranceid ] [ eX ] );
INI_WriteFloat( eFile, "E_Y", EntranceInfo [ entranceid ] [ eY ] );
INI_WriteFloat( eFile, "E_Z", EntranceInfo [ entranceid ] [ eZ ] );
INI_WriteInt( eFile, "E_INT", EntranceInfo [ entranceid ] [ Interior ] );
INI_WriteInt( eFile, "E_VIRTUALWORLD", EntranceInfo [ entranceid ] [ VirtualWorld ] );
INI_WriteFloat( eFile, "I_X", EntranceInfo [ entranceid ] [ iX ] );
INI_WriteFloat( eFile, "I_Y", EntranceInfo [ entranceid ] [ iY ] );
INI_WriteFloat( eFile, "I_Z", EntranceInfo [ entranceid ] [ iZ ] );
INI_WriteInt( eFile, "I_INT", EntranceInfo [ entranceid ] [ iInt ] );
INI_WriteInt( eFile, "I_VIRTUALWORLD", EntranceInfo [ entranceid ] [ iVirtualWorld ] );
INI_Close( eFile );
return true;
}